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 TypeMethodDescriptionapproxEqual
(Value argument) boolean
Returns this value as a boolean.double
asDouble()
Returns the XXHash hashcode of this, to enable strings to be encoded (with reasonable safely) as doubles for optimization.Returns 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 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.largerOrEqual
(Value argument) negate()
not()
smallerOrEqual
(Value argument) 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 XXHash 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
-
not
-
or
-
and
-
largerOrEqual
- Specified by:
largerOrEqual
in classValue
-
larger
-
smallerOrEqual
- Specified by:
smallerOrEqual
in classValue
-
smaller
-
approxEqual
- Specified by:
approxEqual
in classValue
-
notEqual
-
equal
-
add
-
subtract
-
multiply
-
divide
-
modulo
-
power
-
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
-