public final class NotEqualPredicate extends EqualPredicate
value
Constructor and Description |
---|
NotEqualPredicate() |
NotEqualPredicate(String attribute,
Comparable value) |
Modifier and Type | Method and Description |
---|---|
boolean |
apply(Map.Entry entry)
Applies this predicate to the given map entry.
|
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.
|
int |
getId()
Returns type identifier for this class.
|
int |
hashCode() |
boolean |
isIndexed(QueryContext queryContext)
Signals to the query engine that this predicate is able to utilize the
indexes available while executing the query in the given query context.
|
Predicate |
negate()
Create logical negation of itself.
|
String |
toString() |
applyForSingleAttributeValue, getAttribute, getFrom, getTo, isFromInclusive, isToInclusive, readData, writeData
getIndex, matchIndex
convert, convertAndApplyForSingleAttributeValue, convertEnumValue, getFactoryId, readAttributeValue
public NotEqualPredicate()
public NotEqualPredicate(String attribute, Comparable value)
public boolean apply(Map.Entry entry)
Predicate
Implementations must be thread-safe, since this method may be called by multiple threads concurrently.
apply
in interface Predicate
apply
in class AbstractPredicate
entry
- the map entry to apply this predicate to.true
if the given map entry matches this predicate,
false
otherwise.public boolean isIndexed(QueryContext queryContext)
IndexAwarePredicate
isIndexed
in interface IndexAwarePredicate
isIndexed
in class AbstractIndexAwarePredicate
queryContext
- the query context to consult for the available
indexes.true
if this predicate is able to use the indexes to
speed up the processing, false
otherwise.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
filter
in class EqualPredicate
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 String toString()
toString
in class EqualPredicate
public Predicate negate()
NegatablePredicate
negate
in interface NegatablePredicate
negate
in class EqualPredicate
public int getId()
IdentifiedDataSerializable
getId
in interface IdentifiedDataSerializable
getId
in class EqualPredicate
public boolean equals(Object o)
equals
in class EqualPredicate
public boolean canEqual(Object other)
canEqual
in class EqualPredicate
public int hashCode()
hashCode
in class EqualPredicate
Copyright © 2019 Hazelcast, Inc.. All Rights Reserved.