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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal int
boolean
abstract double
getFloat()
Returns the float representation of this result.abstract long
Returns the integer representation of this result.abstract byte[]
getRaw()
Returns the raw byte array representation of this result.abstract String
Returns the string representation of this result.void
negate()
Negate the value contained within the result node.protected abstract int
onCmp
(ResultNode rhs) This method must be implemented by all subclasses of this to allow ordering of results.protected int
protected abstract void
set
(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, visitMembers
Methods 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:
onGetClassId
in classcom.yahoo.vespa.objects.Identifiable
-
compareTo
- Specified by:
compareTo
in interfaceComparable<ResultNode>
-
equals
- Overrides:
equals
in 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 theCloneable
implementation.- 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.
-