Class BucketResolver
java.lang.Object
com.yahoo.search.grouping.request.BucketResolver
This is a helper class for resolving buckets to a list of
GroupingExpression
objects. To resolve a list simply
push(ConstantValue, boolean)
onto it, before calling
resolve(GroupingExpression)
to retrieve the list of corresponding
grouping expression object.- Author:
- Simon Thoresen Hult
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionpush
(ConstantValue<?> val, boolean inclusive) Pushes the given expression onto this bucket resolver.Resolves and returns the list of grouping expressions that correspond to the previously pushed buckets.
-
Constructor Details
-
BucketResolver
public BucketResolver()
-
-
Method Details
-
push
Pushes the given expression onto this bucket resolver. Once all buckets have been pushed using this method, callresolve(GroupingExpression)
to retrieve to combined grouping expression.- Parameters:
val
- the expression to pushinclusive
- whether or not the value is inclusive or not- Throws:
IllegalArgumentException
- thrown if the expression is incompatible
-
resolve
Resolves and returns the list of grouping expressions that correspond to the previously pushed buckets.- Parameters:
exp
- The expression to assign to the function.- Returns:
- The list corresponding to the pushed buckets.
-