public class BoundedRangePredicate extends AbstractIndexAwarePredicate implements RangePredicate
Instances of this class are never transferred between members, the serialization is disabled.
| Constructor and Description |
|---|
BoundedRangePredicate(String attribute,
Comparable from,
boolean fromInclusive,
Comparable to,
boolean toInclusive)
Creates a new instance of bounded range predicate.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
applyForSingleAttributeValue(Comparable value) |
Set<QueryableEntry> |
filter(QueryContext queryContext)
Produces a filtered entry set by utilizing the indexes available while
executing the query in the given query context.
|
String |
getAttribute() |
Comparable |
getFrom() |
int |
getId()
Returns type identifier for this class.
|
Comparable |
getTo() |
boolean |
isFromInclusive() |
boolean |
isToInclusive() |
String |
toString() |
getIndex, isIndexed, matchIndexapply, canEqual, convert, equals, getFactoryId, hashCode, readData, writeDatapublic BoundedRangePredicate(String attribute, Comparable from, boolean fromInclusive, Comparable to, boolean toInclusive)
attribute - the attribute to act on.from - the lower/left range bound.fromInclusive - true if the range is left-closed,
false otherwise.to - the upper/right range bound.toInclusive - true if the range is right-closed,
false otherwise.public Set<QueryableEntry> filter(QueryContext queryContext)
IndexAwarePredicateThe query engine assumes this method produces the result set faster than a simple evaluation of the predicate on every entry.
filter in interface IndexAwarePredicatequeryContext - the query context to access the indexes. The passed
query context is valid only for a duration of a single
call to the method.protected boolean applyForSingleAttributeValue(Comparable value)
applyForSingleAttributeValue in class AbstractPredicatepublic int getId()
IdentifiedDataSerializablegetId in interface IdentifiedDataSerializablepublic String getAttribute()
getAttribute in interface RangePredicatepublic Comparable getFrom()
getFrom in interface RangePredicatenull if
the predicate range is left-unbounded.public boolean isFromInclusive()
isFromInclusive in interface RangePredicatetrue if the predicate range is left-closed, false
otherwise.
Can't be true if the predicate range is left-unbounded.
public Comparable getTo()
getTo in interface RangePredicatenull if
the predicate range is right-unbounded.public boolean isToInclusive()
isToInclusive in interface RangePredicatetrue if the predicate range is right-closed, false
otherwise.
Can't be true if the predicate range is right-unbounded.
Copyright © 2020 Hazelcast, Inc.. All Rights Reserved.