Class BooleanValue
java.lang.Object
com.yahoo.searchlib.rankingexpression.evaluation.Value
com.yahoo.searchlib.rankingexpression.evaluation.DoubleCompatibleValue
com.yahoo.searchlib.rankingexpression.evaluation.BooleanValue
A value which is either true or false.
In numerical context true is interpreted as 1 and false as 0.
- Author:
- bratseth
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns this value as a boolean.double
asDouble()
Returns this value as a double, or throws UnsupportedOperationException if it cannot be represented as a doubleReturns this is mutable, or a mutable copy otherwiseboolean
static BooleanValue
frozen
(boolean value) Create a boolean value which is frozen at the outset.int
hashCode()
Returns a hash which only depends on the content of this value.toString()
Methods inherited from class com.yahoo.searchlib.rankingexpression.evaluation.DoubleCompatibleValue
add, and, approxEqual, asTensor, divide, equal, function, hasDouble, larger, largerOrEqual, modulo, multiply, negate, not, notEqual, or, power, smaller, smallerOrEqual, subtract, type
Methods inherited from class com.yahoo.searchlib.rankingexpression.evaluation.Value
asDoubleValue, doubleAsTensor, freeze, isFrozen, isNaN, of, of, parse
-
Constructor Details
-
BooleanValue
public BooleanValue(boolean value)
-
-
Method Details
-
frozen
Create a boolean value which is frozen at the outset. -
asBoolean
public boolean asBoolean()Description copied from class:Value
Returns this value as a boolean. -
asDouble
public double asDouble()Description copied from class:Value
Returns this value as a double, or throws UnsupportedOperationException if it cannot be represented as a double -
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.
-