Class FeatureList
java.lang.Object
com.yahoo.searchlib.rankingexpression.FeatureList
- All Implemented Interfaces:
Iterable<ReferenceNode>
Encapsulates the production rule 'featureList()' in the RankingExpressionParser.
- Author:
- Simon Thoresen Hult
-
Constructor Summary
ConstructorDescriptionFeatureList
(File file) Creates a new feature list by reading the content of a file.FeatureList
(Reader reader) Creates a new feature list by consuming from a reader object.FeatureList
(String list) Creates a new feature list by parsing a string. -
Method Summary
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
FeatureList
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
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.
-
FeatureList
Creates a new feature list by reading the content of a file.- Parameters:
file
- The file whose content to parse.- Throws:
ParseException
- Thrown if the string could not be parsed.FileNotFoundException
- Thrown if the file specified could not be found.
-
-
Method Details
-
size
public int size()Returns the number of features in this list.- Returns:
- The size.
-
get
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() -
equals
-
toString
-
iterator
- Specified by:
iterator
in interfaceIterable<ReferenceNode>
-