Class FeatureList

  • All Implemented Interfaces:
    Iterable<ReferenceNode>

    @Beta
    public class FeatureList
    extends Object
    implements Iterable<ReferenceNode>
    Encapsulates the production rule 'featureList()' int the RankingExpressionParser.
    Author:
    Simon Thoresen Hult
    • Constructor Detail

      • FeatureList

        public FeatureList​(Reader reader)
                    throws ParseException
        Creates a new feature list by consuming from a reader object.
        Parameters:
        reader - The reader that contains the string to parse.
        Throws:
        ParseException - Thrown if the string could not be parsed.
      • FeatureList

        public FeatureList​(String list)
                    throws ParseException
        Creates a new feature list by parsing a string.
        Parameters:
        list - The string to parse.
        Throws:
        ParseException - Thrown if the string could not be parsed.
    • Method Detail

      • size

        public int size()
        Returns the number of features in this list.
        Returns:
        The size.
      • get

        public ReferenceNode get​(int i)
        Returns the feature at the given index.
        Parameters:
        i - the index of the feature to return.
        Returns:
        the feature at the given index.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object