Class StringValue
java.lang.Object
com.yahoo.searchlib.rankingexpression.evaluation.Value
com.yahoo.searchlib.rankingexpression.evaluation.StringValue
A string value.
- Author:
- bratseth
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns this value as a boolean.double
asDouble()
Returns the hashcode of this, to enable strings to be encoded (with reasonable safely) as doubles for optimizationReturns this is mutable, or a mutable copy otherwiseasString()
Returns the value of this as a stringcom.yahoo.tensor.Tensor
asTensor()
Returns this as a tensor valuecompare
(TruthOperator operator, Value value) Perform the comparison specified by the operator between this value and the given valueboolean
static StringValue
Create a string value which is frozen at the outset.Perform the given binary function on this value and the given valueboolean
Returns true if this value can return itself as a double, i.e asDoubleValue will return a value and not throwint
hashCode()
Returns a hash which only depends on the content of this value.negate()
not()
toString()
com.yahoo.tensor.TensorType
type()
Returns the type of this valueMethods inherited from class com.yahoo.searchlib.rankingexpression.evaluation.Value
asDoubleValue, doubleAsTensor, freeze, isFrozen, isNaN, of, of, parse
-
Constructor Details
-
StringValue
-
-
Method Details
-
frozen
Create a string value which is frozen at the outset. -
type
public com.yahoo.tensor.TensorType type()Description copied from class:Value
Returns the type of this value -
asDouble
public double asDouble()Returns the hashcode of this, to enable strings to be encoded (with reasonable safely) as doubles for optimization -
asTensor
public com.yahoo.tensor.Tensor asTensor()Description copied from class:Value
Returns this as a tensor value -
hasDouble
public boolean hasDouble()Description copied from class:Value
Returns true if this value can return itself as a double, i.e asDoubleValue will return a value and not throw -
asBoolean
public boolean asBoolean()Description copied from class:Value
Returns this value as a boolean. -
negate
-
add
-
subtract
-
multiply
-
divide
-
modulo
-
and
-
or
-
not
-
power
-
compare
Description copied from class:Value
Perform the comparison specified by the operator between this value and the given value -
function
Description copied from class:Value
Perform the given binary function on this value and the given value -
asMutable
Description copied from class:Value
Returns this is mutable, or a mutable copy otherwise -
toString
-
equals
-
hashCode
public int hashCode()Description copied from class:Value
Returns a hash which only depends on the content of this value. -
asString
Returns the value of this as a string
-