Package com.yahoo.searchlib.expression
Class ResultNode
java.lang.Object
com.yahoo.vespa.objects.Selectable
com.yahoo.vespa.objects.Identifiable
com.yahoo.searchlib.expression.ResultNode
- All Implemented Interfaces:
Cloneable,Comparable<ResultNode>
- Direct Known Subclasses:
BoolResultNode,BucketResultNode,NullResultNode,PositiveInfinityResultNode,ResultNodeVector,SingleResultNode
public abstract class ResultNode
extends com.yahoo.vespa.objects.Identifiable
implements Comparable<ResultNode>
This abstract expression node represents the result value of execution.
- Author:
- baldersheim, Simon Thoresen Hult
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal intbooleanabstract doublegetFloat()Returns the float representation of this result.abstract longReturns the integer representation of this result.abstract byte[]getRaw()Returns the raw byte array representation of this result.abstract StringReturns the string representation of this result.voidnegate()Negate the value contained within the result node.protected abstract intonCmp(ResultNode rhs) This method must be implemented by all subclasses of this to allow ordering of results.protected intprotected abstract voidset(ResultNode rhs) This method must be implemented by all subclasses of this to allow new results to be calculated.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, visitMembersMethods inherited from class com.yahoo.vespa.objects.Selectable
select, select, selectMembers
-
Field Details
-
classId
public static final int classId
-
-
Constructor Details
-
ResultNode
public ResultNode()
-
-
Method Details
-
onGetClassId
protected int onGetClassId()- Overrides:
onGetClassIdin classcom.yahoo.vespa.objects.Identifiable
-
compareTo
- Specified by:
compareToin interfaceComparable<ResultNode>
-
equals
- Overrides:
equalsin classcom.yahoo.vespa.objects.Identifiable
-
set
This method must be implemented by all subclasses of this to allow new results to be calculated.- Parameters:
rhs- The node to get the result from.
-
onCmp
This method must be implemented by all subclasses of this to allow ordering of results. This method is used by theCloneableimplementation.- Parameters:
rhs- The other node to compare with.- Returns:
- Comparable result.
-
getInteger
public abstract long getInteger()Returns the integer representation of this result.- Returns:
- The value of this.
-
getFloat
public abstract double getFloat()Returns the float representation of this result.- Returns:
- The value of this.
-
getString
Returns the string representation of this result.- Returns:
- The value of this.
-
getRaw
public abstract byte[] getRaw()Returns the raw byte array representation of this result.- Returns:
- The value of this.
-
negate
public void negate()Negate the value contained within the result node.
-