Class Reference
- java.lang.Object
-
- com.yahoo.tensor.evaluation.Name
-
- com.yahoo.searchlib.rankingexpression.Reference
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Arguments
arguments()
int
compareTo(Reference o)
boolean
equals(java.lang.Object o)
static Reference
fromIdentifier(java.lang.String identifier)
int
hashCode()
boolean
isIdentifier()
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).java.lang.String
output()
static java.util.Optional<Reference>
simple(java.lang.String feature)
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
simple(java.lang.String name, java.lang.String argumentValue)
Creates a reference to a simple feature consisting of a name and a single argumentjava.util.Optional<java.lang.String>
simpleArgument()
If the arguments of this contains a single argument which is an identifier, it is returned.java.lang.String
toString()
java.lang.StringBuilder
toString(java.lang.StringBuilder b, SerializationContext context, java.util.Deque<java.lang.String> path, CompositeNode parent)
Reference
withArguments(Arguments arguments)
Reference
withOutput(java.lang.String output)
-
-
-
Constructor Detail
-
Reference
public Reference(java.lang.String name, Arguments arguments, java.lang.String output)
-
-
Method Detail
-
fromIdentifier
public static Reference fromIdentifier(java.lang.String identifier)
-
arguments
public Arguments arguments()
-
output
public java.lang.String output()
-
simple
public static Reference simple(java.lang.String name, java.lang.String argumentValue)
Creates a reference to a simple feature consisting of a name and a single argument
-
simple
public static java.util.Optional<Reference> simple(java.lang.String feature)
Returns the given simple feature as a reference, or empty if it is not a valid simple feature string on the form name(argument).
-
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
public java.util.Optional<java.lang.String> simpleArgument()
If the arguments of this contains a single argument which is an identifier, it is returned. Otherwise null is returned.
-
withOutput
public Reference withOutput(java.lang.String output)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classcom.yahoo.tensor.evaluation.Name
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classcom.yahoo.tensor.evaluation.Name
-
toString
public java.lang.String toString()
- Overrides:
toString
in classcom.yahoo.tensor.evaluation.Name
-
toString
public java.lang.StringBuilder toString(java.lang.StringBuilder b, SerializationContext context, java.util.Deque<java.lang.String> path, CompositeNode parent)
-
-