Package com.yahoo.searchlib.expression
Class BucketResultNode
- java.lang.Object
-
- com.yahoo.vespa.objects.Selectable
-
- com.yahoo.vespa.objects.Identifiable
-
- com.yahoo.searchlib.expression.ResultNode
-
- com.yahoo.searchlib.expression.BucketResultNode
-
- All Implemented Interfaces:
java.lang.Cloneable
,java.lang.Comparable<ResultNode>
- Direct Known Subclasses:
FloatBucketResultNode
,IntegerBucketResultNode
,RawBucketResultNode
,StringBucketResultNode
public abstract class BucketResultNode extends ResultNode
This is the superclass of all bucket values- Author:
- Haavard Pettersen, baldersheim, Simon Thoresen Hult
-
-
Field Summary
Fields Modifier and Type Field Description static int
classId
-
Constructor Summary
Constructors Constructor Description BucketResultNode()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract boolean
empty()
Tell if this bucket has zero width.double
getFloat()
Returns the float representation of this result.long
getInteger()
Returns the integer representation of this result.byte[]
getRaw()
Returns the raw byte array representation of this result.java.lang.String
getString()
Returns the string representation of this result.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.searchlib.expression.ResultNode
compareTo, equals, negate, onCmp, onGetClassId
-
Methods inherited from class com.yahoo.vespa.objects.Identifiable
clone, create, createFromId, deserialize, deserializeOptional, deserializeWithId, equals, getClassId, getUtf8, hashCode, onDeserialize, onSerialize, putUtf8, registerClass, serialize, serializeOptional, serializeWithId, toString, visitMembers
-
-
-
-
Method Detail
-
getInteger
public long getInteger()
Description copied from class:ResultNode
Returns the integer representation of this result.- Specified by:
getInteger
in classResultNode
- Returns:
- The value of this.
-
getFloat
public double getFloat()
Description copied from class:ResultNode
Returns the float representation of this result.- Specified by:
getFloat
in classResultNode
- Returns:
- The value of this.
-
getString
public java.lang.String getString()
Description copied from class:ResultNode
Returns the string representation of this result.- Specified by:
getString
in classResultNode
- Returns:
- The value of this.
-
getRaw
public byte[] getRaw()
Description copied from class:ResultNode
Returns the raw byte array representation of this result.- Specified by:
getRaw
in classResultNode
- Returns:
- The value of this.
-
set
public void set(ResultNode rhs)
Description copied from class:ResultNode
This method must be implemented by all subclasses of this to allow new results to be calculated.- Specified by:
set
in classResultNode
- Parameters:
rhs
- The node to get the result from.
-
empty
public abstract boolean empty()
Tell if this bucket has zero width. Indicates that is has no value and can be considered a NULL range. An empty range is used by the backend to represent hits that end in no buckets.- Returns:
- If this bucket has zero width.
-
-