|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jaggregate.Comparables
public class Comparables
Utility class that offers useful operations on Comparables.
Method Summary | ||
---|---|---|
static
|
between(E minimum,
E maximum)
Answers a predicate which will answer true if its argument compares
"between" the given minimum and maximum, inclusive. |
|
static
|
greaterThan(E comparand)
Answers a predicate which will answer true if its argument compares
"greater than" the given comparand. |
|
static
|
greaterThanOrEqualTo(E comparand)
Answers a predicate which will answer true if its argument compares
"greater than" or "equal to" the given comparand. |
|
static
|
lessThan(E comparand)
Answers a predicate which will answer true if its argument compares
"less than" the given comparand. |
|
static
|
lessThanOrEqualTo(E comparand)
Answers a predicate which will answer true if its argument compares
"less than" or "equal to" the given comparand. |
|
static
|
max()
Answers a function which will give the greater of its two arguments. |
|
static
|
min()
Answers a function which will give the lesser of its two arguments. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static <E extends Comparable<? super E>> UnaryPredicate<E> lessThan(E comparand)
true
if its argument compares
"less than" the given comparand.
For purposes of this comparison, null
always compares "less than"
non-null
.
E
- a constraint on the type of the comparandcomparand
- the comparand to use with the returned predicate
comparand
public static <E extends Comparable<? super E>> UnaryPredicate<E> lessThanOrEqualTo(E comparand)
true
if its argument compares
"less than" or "equal to" the given comparand.
For purposes of this comparison, null
always compares "less than"
non-null
.
E
- a constraint on the type of the comparandcomparand
- the comparand to use with the returned predicate
comparand
public static <E extends Comparable<? super E>> UnaryPredicate<E> greaterThan(E comparand)
true
if its argument compares
"greater than" the given comparand.
For purposes of this comparison, null
always compares "less than"
non-null
.
E
- a constraint on the type of the comparandcomparand
- the comparand to use with the returned predicate
comparand
public static <E extends Comparable<? super E>> UnaryPredicate<E> greaterThanOrEqualTo(E comparand)
true
if its argument compares
"greater than" or "equal to" the given comparand.
For purposes of this comparison, null
always compares "less than"
non-null
.
E
- a constraint on the type of the comparandcomparand
- the comparand to use with the returned predicate
comparand
public static <E extends Comparable<? super E>> UnaryPredicate<E> between(E minimum, E maximum)
true
if its argument compares
"between" the given minimum and maximum, inclusive.
For purposes of this comparison, null
always compares "less than"
non-null
.
E
- a constraint on the type of the boundsminimum
- the lower boundmaximum
- the upper bound
minimum
and maximum
public static <E extends Comparable<? super E>> BinaryFunction<E,E,E> max()
null
always compares "less than"
non-null
.
E
- a constraint on the types of the function's arguments
public static <E extends Comparable<? super E>> BinaryFunction<E,E,E> min()
null
always compares "less than"
non-null
.
E
- a constraint on the types of the function's arguments
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |