Package com.yahoo.searchlib.expression
Class NumericResultNode
java.lang.Object
com.yahoo.vespa.objects.Selectable
com.yahoo.vespa.objects.Identifiable
com.yahoo.searchlib.expression.ResultNode
com.yahoo.searchlib.expression.SingleResultNode
com.yahoo.searchlib.expression.NumericResultNode
- All Implemented Interfaces:
Cloneable
,Comparable<ResultNode>
- Direct Known Subclasses:
FloatResultNode
,Int16ResultNode
,Int32ResultNode
,Int8ResultNode
,IntegerResultNode
This is a superclass for all numerical results.
- Author:
- baldersheim, Simon Thoresen Hult
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
divide
(ResultNode rhs) In-place division of this result with another.abstract Object
Return a java numeric, either Double or Long, depending on the underlying container.getValue()
Return a java native, either String, Double or Long, depending on the underlying container.abstract void
modulo
(ResultNode rhs) In-place modulo of this result with another.abstract void
multiply
(ResultNode rhs) In-place multiplication of this result with another.protected int
Methods inherited from class com.yahoo.searchlib.expression.SingleResultNode
add, max, min
Methods inherited from class com.yahoo.searchlib.expression.ResultNode
compareTo, equals, getFloat, getInteger, getRaw, getString, negate, onCmp, set
Methods inherited from class com.yahoo.vespa.objects.Identifiable
clone, create, createFromId, deserialize, deserializeOptional, deserializeWithId, equals, getClassId, getRawUtf8Bytes, getUtf8, hashCode, onDeserialize, onSerialize, putUtf8, registerClass, serialize, serializeOptional, serializeWithId, toString, visitMembers
Methods inherited from class com.yahoo.vespa.objects.Selectable
select, select, selectMembers
-
Field Details
-
classId
public static final int classId
-
-
Constructor Details
-
NumericResultNode
public NumericResultNode()
-
-
Method Details
-
multiply
In-place multiplication of this result with another.- Parameters:
rhs
- The result to multiply with this.
-
divide
In-place division of this result with another.- Parameters:
rhs
- The result to divide this by.
-
modulo
In-place modulo of this result with another.- Parameters:
rhs
- The result to modulo this with.
-
getNumber
Return a java numeric, either Double or Long, depending on the underlying container.- Returns:
- The underlying numeric value.
-
getValue
Description copied from class:SingleResultNode
Return a java native, either String, Double or Long, depending on the underlying container.- Specified by:
getValue
in classSingleResultNode
- Returns:
- The underlying numeric value.
-
onGetClassId
protected int onGetClassId()- Overrides:
onGetClassId
in classResultNode
-