public final class PredicateUtils extends Object
Modifier and Type | Method and Description |
---|---|
static String |
canonicalizeAttribute(String attribute)
Produces canonical attribute representation in the following way:
Strips an unnecessary "this." qualifier from the passed attribute.
|
static String |
constructCanonicalCompositeIndexName(String[] components)
Constructs a canonical index name from the given index components.
|
static int |
estimatedSizeOf(Collection<QueryableEntry> result)
In case of AndResultSet and OrResultSet calling size() may be very
expensive so quicker estimatedSize() is used.
|
static boolean |
isEqualPredicate(Predicate predicate) |
static boolean |
isNull(Comparable value) |
static boolean |
isRangePredicate(Predicate predicate) |
public static int estimatedSizeOf(Collection<QueryableEntry> result)
result
- result of a predicated searchAndResultSet.estimatedSize()
,
OrResultSet.estimatedSize()
public static boolean isNull(Comparable value)
true
if the given value is considered as a null-like by
predicates and indexes, false
otherwise.public static boolean isRangePredicate(Predicate predicate)
true
if the given predicate is a RangePredicate
,
false
otherwise.public static boolean isEqualPredicate(Predicate predicate)
true
if the given predicate is an EqualPredicate
,
false
otherwise.public static String canonicalizeAttribute(String attribute)
attribute
- the attribute to canonicalize.constructCanonicalCompositeIndexName(java.lang.String[])
public static String constructCanonicalCompositeIndexName(String[] components)
A canonical name is a comma-separated list of index components with a single space character going after every comma.
It's a caller's responsibility to canonicalize individual components
as specified by canonicalizeAttribute(java.lang.String)
.
components
- the index components to construct the canonical index
name from.Copyright © 2020 Hazelcast, Inc.. All Rights Reserved.