Class Reference
java.lang.Object
com.yahoo.tensor.evaluation.Name
com.yahoo.searchlib.rankingexpression.Reference
- All Implemented Interfaces:
Comparable<Reference>
A reference to a feature, function, or value in ranking expressions
- Author:
- bratseth
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
boolean
static Reference
fromIdentifier
(String identifier) Creates a reference from a simple identifier.int
hashCode()
boolean
Returns true if this was created by fromIdentifier.boolean
isSimple()
A simple feature reference is a reference with a single identifier argument (and an optional output).output()
Returns the given simple feature as a reference, or empty if it is not a valid simple feature string on the form name(argument).static Reference
Creates a reference to a simple feature consisting of a name and a single argumentIf the arguments of this contains a single argument which is an identifier, it is returned.toString()
toString
(StringBuilder b, SerializationContext context, Deque<String> path, CompositeNode parent) withArguments
(Arguments arguments) withOutput
(String output) Methods inherited from class com.yahoo.tensor.evaluation.Name
name
-
Constructor Details
-
Reference
-
-
Method Details
-
arguments
-
output
-
isIdentifier
public boolean isIdentifier()Returns true if this was created by fromIdentifier. Identifiers have no arguments or outputs. -
isSimple
public boolean isSimple()A simple feature reference is a reference with a single identifier argument (and an optional output). -
simpleArgument
If the arguments of this contains a single argument which is an identifier, it is returned. Otherwise null is returned. -
withArguments
-
withOutput
-
equals
- Overrides:
equals
in classcom.yahoo.tensor.evaluation.Name
-
hashCode
public int hashCode()- Overrides:
hashCode
in classcom.yahoo.tensor.evaluation.Name
-
toString
- Overrides:
toString
in classcom.yahoo.tensor.evaluation.Name
-
toString
public StringBuilder toString(StringBuilder b, SerializationContext context, Deque<String> path, CompositeNode parent) -
compareTo
- Specified by:
compareTo
in interfaceComparable<Reference>
-
fromIdentifier
Creates a reference from a simple identifier. -
simple
Creates a reference to a simple feature consisting of a name and a single argument -
simple
Returns the given simple feature as a reference, or empty if it is not a valid simple feature string on the form name(argument).
-