Class LongValue
- java.lang.Object
-
- com.yahoo.searchlib.rankingexpression.evaluation.Value
-
- com.yahoo.searchlib.rankingexpression.evaluation.DoubleCompatibleValue
-
- com.yahoo.searchlib.rankingexpression.evaluation.LongValue
-
public class LongValue extends DoubleCompatibleValue
A representation for integer numbers- Author:
- balder
-
-
Constructor Summary
Constructors Constructor Description LongValue(long value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Value
add(Value value)
boolean
asBoolean()
Returns this value as a boolean.double
asDouble()
Returns this value as a double, or throws UnsupportedOperationException if it cannot be represented as a doubleValue
asMutable()
Returns this is mutable, or a mutable copy otherwiseValue
divide(Value value)
boolean
equals(Object other)
Value
function(Function function, Value value)
Perform the given binary function on this value and the given valueint
hashCode()
Value
modulo(Value value)
Value
multiply(Value value)
Value
negate()
Value
subtract(Value value)
String
toString()
-
Methods inherited from class com.yahoo.searchlib.rankingexpression.evaluation.DoubleCompatibleValue
and, asTensor, compare, hasDouble, not, or, power, type
-
Methods inherited from class com.yahoo.searchlib.rankingexpression.evaluation.Value
asDoubleValue, doubleAsTensor, freeze, isFrozen, isNaN, of, of, parse
-
-
-
-
Method Detail
-
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
-
asBoolean
public boolean asBoolean()
Description copied from class:Value
Returns this value as a boolean.
-
asMutable
public Value asMutable()
Description copied from class:Value
Returns this is mutable, or a mutable copy otherwise
-
negate
public Value negate()
- Overrides:
negate
in classDoubleCompatibleValue
-
add
public Value add(Value value)
- Overrides:
add
in classDoubleCompatibleValue
-
subtract
public Value subtract(Value value)
- Overrides:
subtract
in classDoubleCompatibleValue
-
multiply
public Value multiply(Value value)
- Overrides:
multiply
in classDoubleCompatibleValue
-
divide
public Value divide(Value value)
- Overrides:
divide
in classDoubleCompatibleValue
-
modulo
public Value modulo(Value value)
- Overrides:
modulo
in classDoubleCompatibleValue
-
-