public final class GreaterLessPredicate extends AbstractIndexAwarePredicate implements NegatablePredicate, RangePredicate
| Modifier and Type | Field and Description |
|---|---|
protected Comparable |
value |
| Constructor and Description |
|---|
GreaterLessPredicate() |
GreaterLessPredicate(String attribute,
Comparable value,
boolean equal,
boolean less) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
applyForSingleAttributeValue(Comparable attributeValue) |
boolean |
canEqual(Object other) |
boolean |
equals(Object o) |
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() |
int |
hashCode() |
boolean |
isFromInclusive() |
boolean |
isToInclusive() |
Predicate |
negate()
Create logical negation of itself.
|
void |
readData(ObjectDataInput in)
Reads fields from the input stream
|
String |
toString() |
void |
writeData(ObjectDataOutput out)
Writes object fields to output stream
|
getIndex, isIndexed, matchIndexapply, convert, getFactoryIdprotected Comparable value
public GreaterLessPredicate()
public GreaterLessPredicate(String attribute, Comparable value, boolean equal, boolean less)
protected boolean applyForSingleAttributeValue(Comparable attributeValue)
applyForSingleAttributeValue in class AbstractPredicatepublic 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.public void readData(ObjectDataInput in) throws IOException
DataSerializablereadData in interface DataSerializablereadData in class AbstractPredicatein - inputIOException - if an I/O error occurs. In particular,
an IOException may be thrown if the
input stream has been closed.public void writeData(ObjectDataOutput out) throws IOException
DataSerializablewriteData in interface DataSerializablewriteData in class AbstractPredicateout - outputIOException - if an I/O error occurs. In particular,
an IOException may be thrown if the
output stream has been closed.public Predicate negate()
NegatablePredicatenegate in interface NegatablePredicatepublic int getId()
IdentifiedDataSerializablegetId in interface IdentifiedDataSerializablepublic boolean equals(Object o)
equals in class AbstractPredicatepublic boolean canEqual(Object other)
canEqual in class AbstractPredicatepublic int hashCode()
hashCode in class AbstractPredicatepublic 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 © 2022 Hazelcast, Inc.. All Rights Reserved.