Class BetweenSpacePredicate
java.lang.Object
com.gigaspaces.internal.serialization.AbstractExternalizable
com.gigaspaces.internal.query.predicate.AbstractSpacePredicate
com.gigaspaces.internal.query.predicate.comparison.BetweenSpacePredicate
- All Implemented Interfaces:
ISpacePredicate,SmartExternalizable,Externalizable,Serializable
Represents a Between predicate. This is equivalent to using an And Predicate with GreaterEquals
and LessEquals.
- Since:
- 7.1
- Author:
- Niv Ingberg
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor for Externalizable.BetweenSpacePredicate(Comparable<?> low, Comparable<?> high) Creates a Between predicate.BetweenSpacePredicate(Comparable<?> low, Comparable<?> high, boolean lowInclusive, boolean highInclusive) Creates a Between predicate.BetweenSpacePredicate(Comparable<?> low, Comparable<?> high, Comparator<?> comparator) Creates a Between predicate.BetweenSpacePredicate(Comparable<?> low, Comparable<?> high, Comparator<?> comparator, boolean lowInclusive, boolean highInclusive) Creates a Between predicate. -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanExecutes this predicate on the specified target.Gets the predicate which tests the high limit of the between range.Gets the predicate which tests the low limit of the between range.protected voidprotected voidMethods inherited from class com.gigaspaces.internal.query.predicate.AbstractSpacePredicate
preparePredicate, requiresCacheManagerForExecution, setCacheManagerForExecutionMethods inherited from class com.gigaspaces.internal.serialization.AbstractExternalizable
readExternal, writeExternalMethods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.io.Externalizable
readExternal, writeExternalMethods inherited from interface com.gigaspaces.serialization.SmartExternalizable
enabledSmartExternalizableWithReference
-
Constructor Details
-
BetweenSpacePredicate
public BetweenSpacePredicate()Default constructor for Externalizable. -
BetweenSpacePredicate
Creates a Between predicate.- Parameters:
low- Low limit for expected value.high- High limit for expected value.
-
BetweenSpacePredicate
Creates a Between predicate.- Parameters:
low- Low limit for expected value.high- High limit for expected value.comparator- Comparator to use for comparison.
-
BetweenSpacePredicate
public BetweenSpacePredicate(Comparable<?> low, Comparable<?> high, boolean lowInclusive, boolean highInclusive) Creates a Between predicate.- Parameters:
low- Low limit for expected value.high- High limit for expected value.lowInclusive- Determines if low limit comparison is inclusive.highInclusive- Determines if high limit comparison is inclusive.
-
BetweenSpacePredicate
public BetweenSpacePredicate(Comparable<?> low, Comparable<?> high, Comparator<?> comparator, boolean lowInclusive, boolean highInclusive) Creates a Between predicate.- Parameters:
low- Low limit for expected value.high- High limit for expected value.comparator- Comparator to use for comparison.lowInclusive- Determines if low limit comparison is inclusive.highInclusive- Determines if high limit comparison is inclusive.
-
-
Method Details
-
getLowPredicate
Gets the predicate which tests the low limit of the between range. -
getHighPredicate
Gets the predicate which tests the high limit of the between range. -
execute
Description copied from interface:ISpacePredicateExecutes this predicate on the specified target.- Specified by:
executein interfaceISpacePredicate- Specified by:
executein classAbstractSpacePredicate- Returns:
- True if the specified target matches the predicate, false otherwise.
-
equals
-
readExternalImpl
- Overrides:
readExternalImplin classAbstractExternalizable- Throws:
IOExceptionClassNotFoundException
-
writeExternalImpl
- Overrides:
writeExternalImplin classAbstractExternalizable- Throws:
IOException
-