public class BetweenPredicate extends AbstractIndexAwarePredicate implements VisitablePredicate, RangePredicate
Constructor and Description |
---|
BetweenPredicate() |
BetweenPredicate(String attribute,
Comparable from,
Comparable to) |
Modifier and Type | Method and Description |
---|---|
Predicate |
accept(Visitor visitor,
Indexes indexes)
Accept visitor.
|
protected boolean |
applyForSingleAttributeValue(Map.Entry entry,
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() |
void |
readData(ObjectDataInput in)
Reads fields from the input stream
|
String |
toString() |
void |
writeData(ObjectDataOutput out)
Writes object fields to output stream
|
getIndex, isIndexed, matchIndex
apply, convert, convertAndApplyForSingleAttributeValue, convertEnumValue, getFactoryId, readAttributeValue
public BetweenPredicate()
public BetweenPredicate(String attribute, Comparable from, Comparable to)
protected boolean applyForSingleAttributeValue(Map.Entry entry, Comparable attributeValue)
applyForSingleAttributeValue
in class AbstractPredicate
public Set<QueryableEntry> filter(QueryContext queryContext)
IndexAwarePredicate
The query engine assumes this method produces the result set faster than a simple evaluation of the predicate on every entry.
filter
in interface IndexAwarePredicate
queryContext
- 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 writeData(ObjectDataOutput out) throws IOException
DataSerializable
writeData
in interface DataSerializable
writeData
in class AbstractPredicate
out
- outputIOException
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
output stream has been closed.public void readData(ObjectDataInput in) throws IOException
DataSerializable
readData
in interface DataSerializable
readData
in class AbstractPredicate
in
- inputIOException
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
input stream has been closed.public int getId()
IdentifiedDataSerializable
getId
in interface IdentifiedDataSerializable
public boolean equals(Object o)
equals
in class AbstractPredicate
public boolean canEqual(Object other)
canEqual
in class AbstractPredicate
public int hashCode()
hashCode
in class AbstractPredicate
public Predicate accept(Visitor visitor, Indexes indexes)
VisitablePredicate
accept
in interface VisitablePredicate
visitor
- visitor to acceptindexes
- indexespublic String getAttribute()
getAttribute
in interface RangePredicate
public Comparable getFrom()
getFrom
in interface RangePredicate
null
if
the predicate range is left-unbounded.public boolean isFromInclusive()
isFromInclusive
in interface RangePredicate
true
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 RangePredicate
null
if
the predicate range is right-unbounded.public boolean isToInclusive()
isToInclusive
in interface RangePredicate
true
if the predicate range is right-closed, false
otherwise.
Can't be true
if the predicate range is right-unbounded.
Copyright © 2019 Hazelcast, Inc.. All Rights Reserved.