Class StringBucket
- java.lang.Object
-
- com.yahoo.search.grouping.request.GroupingNode
-
- com.yahoo.search.grouping.request.GroupingExpression
-
- com.yahoo.search.grouping.request.BucketValue
-
- com.yahoo.search.grouping.request.StringBucket
-
- All Implemented Interfaces:
java.lang.Comparable<BucketValue>
public class StringBucket extends BucketValue
This class represents aString
bucket in aPredefinedFunction
.- Author:
- Simon Thoresen Hult
-
-
Constructor Summary
Constructors Constructor Description StringBucket(ConstantValue<?> from, ConstantValue<?> to)
Constructs a new bucket for a range of strings.StringBucket(StringValue value)
Constructs a new bucket for a single unique stringStringBucket(java.lang.String value)
Constructs a new bucket for a single unique stringStringBucket(java.lang.String from, java.lang.String to)
Constructs a new bucket for a range of strings.StringBucket(java.lang.String from, java.lang.String to, boolean toInclusive)
Constructs a new bucket for a range of strings.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringBucket
copy()
Returns a deep copy of thisstatic StringValue
nextValue(StringValue value)
Returns the next distinct value after the given value-
Methods inherited from class com.yahoo.search.grouping.request.BucketValue
compareTo, equals, getFrom, getTo, 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
-
StringBucket
public StringBucket(java.lang.String value)
Constructs a new bucket for a single unique string
-
StringBucket
public StringBucket(StringValue value)
Constructs a new bucket for a single unique string
-
StringBucket
public StringBucket(java.lang.String from, java.lang.String to)
Constructs a new bucket for a range of strings.- Parameters:
from
- the start of the bucket, inclusiveto
- the end of the bucket, exclusive
-
StringBucket
public StringBucket(java.lang.String from, java.lang.String to, boolean toInclusive)
Constructs a new bucket for a range of strings.- Parameters:
from
- the start of the bucket, inclusiveto
- the end of the buckettoInclusive
- whetherto
value should be included in the bucket
-
StringBucket
public StringBucket(ConstantValue<?> from, ConstantValue<?> to)
Constructs a new bucket for a range of strings.- Parameters:
from
- the start of the bucket, inclusiveto
- the end of the bucket, exclusive
-
-
Method Detail
-
nextValue
public static StringValue nextValue(StringValue value)
Returns the next distinct value after the given value
-
copy
public StringBucket copy()
Description copied from class:GroupingExpression
Returns a deep copy of this- Overrides:
copy
in classBucketValue
-
-