T - the binary predicate input typespublic final class IsGreaterThan<T> extends Object implements BinaryPredicate<T,T>, Serializable
BinaryPredicate that tests
true iff the left argument is greater than the
right argument under the specified Comparator.
When no (or a null Comparator is specified,
a Comparable Comparator is used.| Modifier and Type | Field and Description |
|---|---|
static IsGreaterThan<Comparable<?>> |
INSTANCE
Basic IsGreaterThan instance.
|
| Constructor and Description |
|---|
IsGreaterThan()
|
IsGreaterThan(Comparator<? super T> comparator)
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(IsGreaterThan<?> that)
Learn whether a given IsGreaterThan is equal to this.
|
boolean |
equals(Object that) |
int |
hashCode() |
static <T extends Comparable<?>> |
instance()
Get a typed IsGreaterThan instance.
|
static <T extends Comparable<?>> |
instance(T right)
Get an IsGreaterThan UnaryPredicate.
|
boolean |
test(T left,
T right)
Return
true iff the left parameter is
greater than the right parameter under my current
Comparator. |
String |
toString() |
public static final IsGreaterThan<Comparable<?>> INSTANCE
public IsGreaterThan()
public IsGreaterThan(Comparator<? super T> comparator)
comparator - the Comparator, when null,
a Comparator for Comparables will
be used.public boolean test(T left, T right)
true iff the left parameter is
greater than the right parameter under my current
Comparator.
Evaluate this predicate.test in interface BinaryPredicate<T,T>left - the L element of the ordered pair of argumentsright - the R element of the ordered pair of argumentspublic boolean equals(IsGreaterThan<?> that)
that - the IsGreaterThan to testpublic static <T extends Comparable<?>> IsGreaterThan<T> instance()
T - the binary predicate input typespublic static <T extends Comparable<?>> UnaryPredicate<T> instance(T right)
T - the binary predicate input typesright - the right side object of the IsGreaterThan comparisonCopyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.