Package com.yahoo.searchlib.expression
Class IntegerBucketResultNode
java.lang.Object
com.yahoo.vespa.objects.Selectable
com.yahoo.vespa.objects.Identifiable
com.yahoo.searchlib.expression.ResultNode
com.yahoo.searchlib.expression.BucketResultNode
com.yahoo.searchlib.expression.IntegerBucketResultNode
- All Implemented Interfaces:
Cloneable,Comparable<ResultNode>
This is an integer bucket value
- Author:
- Haavard Pettersen, Simon Thoresen Hult
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructs an empty result node.IntegerBucketResultNode(long from, long to) Create a bucket with the given limits -
Method Summary
Modifier and TypeMethodDescriptionbooleanempty()Tell if this bucket has zero width.longgetFrom()Obtain the bucket startlonggetTo()Obtain the bucket endinthashCode()protected intonCmp(ResultNode rhs) This method must be implemented by all subclasses of this to allow ordering of results.protected voidonDeserialize(com.yahoo.vespa.objects.Deserializer buf) protected intprotected voidonSerialize(com.yahoo.vespa.objects.Serializer buf) voidvisitMembers(com.yahoo.vespa.objects.ObjectVisitor visitor) Methods inherited from class com.yahoo.searchlib.expression.BucketResultNode
getFloat, getInteger, getRaw, getString, setMethods inherited from class com.yahoo.searchlib.expression.ResultNode
compareTo, equals, negateMethods inherited from class com.yahoo.vespa.objects.Identifiable
clone, create, createFromId, deserialize, deserializeOptional, deserializeWithId, equals, getClassId, getRawUtf8Bytes, getUtf8, putUtf8, registerClass, serialize, serializeOptional, serializeWithId, toStringMethods inherited from class com.yahoo.vespa.objects.Selectable
select, select, selectMembers
-
Field Details
-
classId
public static final int classId
-
-
Constructor Details
-
IntegerBucketResultNode
public IntegerBucketResultNode()Constructs an empty result node. -
IntegerBucketResultNode
public IntegerBucketResultNode(long from, long to) Create a bucket with the given limits- Parameters:
from- bucket startto- bucket end
-
-
Method Details
-
getFrom
public long getFrom()Obtain the bucket start- Returns:
- bucket start
-
getTo
public long getTo()Obtain the bucket end- Returns:
- bucket end
-
empty
public boolean empty()Description copied from class:BucketResultNodeTell 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.- Specified by:
emptyin classBucketResultNode- Returns:
- If this bucket has zero width.
-
onGetClassId
protected int onGetClassId()- Overrides:
onGetClassIdin classResultNode
-
onSerialize
protected void onSerialize(com.yahoo.vespa.objects.Serializer buf) - Overrides:
onSerializein classcom.yahoo.vespa.objects.Identifiable
-
onDeserialize
protected void onDeserialize(com.yahoo.vespa.objects.Deserializer buf) - Overrides:
onDeserializein classcom.yahoo.vespa.objects.Identifiable
-
onCmp
Description copied from class:ResultNodeThis method must be implemented by all subclasses of this to allow ordering of results. This method is used by theCloneableimplementation.- Specified by:
onCmpin classResultNode- Parameters:
rhs- The other node to compare with.- Returns:
- Comparable result.
-
hashCode
public int hashCode()- Overrides:
hashCodein classcom.yahoo.vespa.objects.Identifiable
-
visitMembers
public void visitMembers(com.yahoo.vespa.objects.ObjectVisitor visitor) - Overrides:
visitMembersin classcom.yahoo.vespa.objects.Identifiable
-