public class BucketResolver extends Object
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.Modifier and Type | Field and Description |
---|---|
private List<BucketValue> |
buckets |
private int |
idx |
private ConstantValue<?> |
prev |
private boolean |
previnclusive |
Constructor and Description |
---|
BucketResolver() |
Modifier and Type | Method and Description |
---|---|
private ConstantValue<?> |
nextValue(ConstantValue<?> value) |
BucketResolver |
push(ConstantValue<?> val,
boolean inclusive)
Pushes the given expression onto this bucket resolver.
|
PredefinedFunction |
resolve(GroupingExpression exp)
Resolves and returns the list of grouping expressions that correspond to the previously pushed buckets.
|
private final List<BucketValue> buckets
private ConstantValue<?> prev
private boolean previnclusive
private int idx
public BucketResolver push(ConstantValue<?> val, boolean inclusive)
resolve(GroupingExpression)
to retrieve to combined grouping expression.val
- The expression to push.inclusive
- Whether or not the value is inclusive or not.IllegalArgumentException
- Thrown if the expression is incompatible.public PredefinedFunction resolve(GroupingExpression exp)
exp
- The expression to assign to the function.private ConstantValue<?> nextValue(ConstantValue<?> value)
Copyright © 2018. All rights reserved.