Class BucketValue
- java.lang.Object
-
- com.yahoo.search.grouping.request.GroupingNode
-
- com.yahoo.search.grouping.request.GroupingExpression
-
- com.yahoo.search.grouping.request.BucketValue
-
- All Implemented Interfaces:
java.lang.Comparable<BucketValue>
- Direct Known Subclasses:
DoubleBucket
,LongBucket
,RawBucket
,StringBucket
public class BucketValue extends GroupingExpression implements java.lang.Comparable<BucketValue>
This class represents a bucket in aPredefinedFunction
. The generic T is the data type of the range values 'from' and 'to'. The range is inclusive-from and exclusive-to. All supported data types are represented as subclasses of this.- Author:
- Simon Thoresen Hult
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
BucketValue(java.lang.String label, java.lang.Integer level, ConstantValue<?> inclusiveFrom, ConstantValue<?> exclusiveTo)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(BucketValue rhs)
BucketValue
copy()
Returns a deep copy of thisboolean
equals(java.lang.Object o)
ConstantValue<?>
getFrom()
Returns the inclusive-from value of this bucket.ConstantValue<?>
getTo()
Returns the exclusive-to value of this bucket.int
hashCode()
-
Methods inherited from class com.yahoo.search.grouping.request.GroupingExpression
asImage, asString, getLevel, getLevelOrNull, resolveLevel, setLabel, visit
-
Methods inherited from class com.yahoo.search.grouping.request.GroupingNode
getImage, getLabel, toString
-
-
-
-
Constructor Detail
-
BucketValue
protected BucketValue(java.lang.String label, java.lang.Integer level, ConstantValue<?> inclusiveFrom, ConstantValue<?> exclusiveTo)
-
-
Method Detail
-
copy
public BucketValue copy()
Description copied from class:GroupingExpression
Returns a deep copy of this- Specified by:
copy
in classGroupingExpression
-
getFrom
public ConstantValue<?> getFrom()
Returns the inclusive-from value of this bucket.- Returns:
- The from-value.
-
getTo
public ConstantValue<?> getTo()
Returns the exclusive-to value of this bucket.- Returns:
- The to-value.
-
compareTo
public int compareTo(BucketValue rhs)
- Specified by:
compareTo
in interfacejava.lang.Comparable<BucketValue>
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-