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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voiddivide(ResultNode rhs) In-place division of this result with another.abstract ObjectReturn 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 voidmodulo(ResultNode rhs) In-place modulo of this result with another.abstract voidmultiply(ResultNode rhs) In-place multiplication of this result with another.protected intMethods inherited from class com.yahoo.searchlib.expression.SingleResultNode
add, max, minMethods inherited from class com.yahoo.searchlib.expression.ResultNode
compareTo, equals, getFloat, getInteger, getRaw, getString, negate, onCmp, setMethods 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, visitMembersMethods 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:SingleResultNodeReturn a java native, either String, Double or Long, depending on the underlying container.- Specified by:
getValuein classSingleResultNode- Returns:
- The underlying numeric value.
-
onGetClassId
protected int onGetClassId()- Overrides:
onGetClassIdin classResultNode
-