Package com.yahoo.searchlib.expression
Class StringBucketResultNode
- 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.StringBucketResultNode
-
- All Implemented Interfaces:
Cloneable
,Comparable<ResultNode>
public class StringBucketResultNode extends BucketResultNode
This is an integer bucket value- Author:
- Haavard Pettersen, Simon Thoresen Hult
-
-
Field Summary
Fields Modifier and Type Field Description static int
classId
-
Constructor Summary
Constructors Constructor Description StringBucketResultNode()
Constructs an empty result node.StringBucketResultNode(ResultNode from, ResultNode to)
Create a bucket with the given limitsStringBucketResultNode(String from, String to)
Create a bucket with the given limits
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
empty()
Tell if this bucket has zero width.String
getFrom()
Obtain the bucket startString
getTo()
Obtain the bucket endint
hashCode()
protected int
onCmp(ResultNode rhs)
This method must be implemented by all subclasses of this to allow ordering of results.protected void
onDeserialize(com.yahoo.vespa.objects.Deserializer buf)
protected int
onGetClassId()
protected void
onSerialize(com.yahoo.vespa.objects.Serializer buf)
void
visitMembers(com.yahoo.vespa.objects.ObjectVisitor visitor)
-
Methods inherited from class com.yahoo.searchlib.expression.BucketResultNode
getFloat, getInteger, getRaw, getString, set
-
Methods inherited from class com.yahoo.searchlib.expression.ResultNode
compareTo, equals, negate
-
-
-
-
Constructor Detail
-
StringBucketResultNode
public StringBucketResultNode()
Constructs an empty result node.
-
StringBucketResultNode
public StringBucketResultNode(ResultNode from, ResultNode to)
Create a bucket with the given limits- Parameters:
from
- bucket startto
- bucket end
-
-
Method Detail
-
empty
public boolean empty()
Description copied from class:BucketResultNode
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.- Specified by:
empty
in classBucketResultNode
- Returns:
- If this bucket has zero width.
-
getFrom
public String getFrom()
Obtain the bucket start- Returns:
- bucket start
-
getTo
public String getTo()
Obtain the bucket end- Returns:
- bucket end
-
onGetClassId
protected int onGetClassId()
- Overrides:
onGetClassId
in classResultNode
-
onSerialize
protected void onSerialize(com.yahoo.vespa.objects.Serializer buf)
- Overrides:
onSerialize
in classcom.yahoo.vespa.objects.Identifiable
-
onDeserialize
protected void onDeserialize(com.yahoo.vespa.objects.Deserializer buf)
- Overrides:
onDeserialize
in classcom.yahoo.vespa.objects.Identifiable
-
onCmp
protected int onCmp(ResultNode rhs)
Description copied from class:ResultNode
This method must be implemented by all subclasses of this to allow ordering of results. This method is used by theCloneable
implementation.- Specified by:
onCmp
in classResultNode
- Parameters:
rhs
- The other node to compare with.- Returns:
- Comparable result.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classcom.yahoo.vespa.objects.Identifiable
-
visitMembers
public void visitMembers(com.yahoo.vespa.objects.ObjectVisitor visitor)
- Overrides:
visitMembers
in classcom.yahoo.vespa.objects.Identifiable
-
-