|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectuk.co.jezuk.mango.BinaryPredicates
public class BinaryPredicates
The Mango Library Binary Predicates
A BinaryPredicate is some function taking two arguments -
fn(x, y) and returning the result of some test.
It returns true if the conditions of the test are satisfied,
false otherwise
BinaryPredicate| Method Summary | ||
|---|---|---|
static
|
And(BinaryPredicate<T1,T2> pred1,
BinaryPredicate<T1,T2> pred2)
A BinaryPredicate which returns the logical AND of two other BinaryPredicate. |
|
static
|
Constant(boolean constant)
A BinaryPredicate which returns a precomputed constant value |
|
static
|
EqualTo()
BinaryPredicate testing for equality. |
|
static
|
False()
BinaryPredicates that always returns false |
|
static
|
GreaterThan()
BinaryPredicate that returns true if x is greater than y. |
|
static
|
GreaterThanEquals()
BinaryPredicate that returns true if x is greater than or equal to y. |
|
static
|
LessThan()
BinaryPredicate that returns true if x is less than y. |
|
static
|
LessThanEquals()
BinaryPredicate that returns true if x is less than or equal to y. |
|
static
|
Not(BinaryPredicate<T1,T2> pred)
A BinaryPredicate which is the logical negation of some other BinaryPredicate. |
|
static
|
NotEqualTo()
true if not(x.equals(y)), (x == null) && not(y == null) or not(x == null) && (y == null) |
|
static
|
Or(BinaryPredicate<T1,T2> pred1,
BinaryPredicate<T1,T2> pred2)
A BinaryPredicate which returns the logical OR of two other BinaryPredicate. |
|
static
|
True()
BinaryPredicates that always returns true |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static <T1,T2> BinaryPredicate<T1,T2> True()
BinaryPredicates that always returns true
public static <T1,T2> BinaryPredicate<T1,T2> False()
BinaryPredicates that always returns false
public static <T1,T2> BinaryPredicate<T1,T2> Constant(boolean constant)
BinaryPredicate which returns a precomputed constant value
public static <T1,T2> BinaryPredicate<T1,T2> EqualTo()
BinaryPredicate testing for equality.
true if x.equals(y) or (x == null && y == null)
public static <T1,T2> BinaryPredicate<T1,T2> GreaterThan()
BinaryPredicate that returns true if x is greater than y.
x and y must implement the java.lang.Comparable interface.
public static <T1,T2> BinaryPredicate<T1,T2> GreaterThanEquals()
BinaryPredicate that returns true if x is greater than or equal to y.
x and y must implement the java.lang.Comparable interface.
public static <T1,T2> BinaryPredicate<T1,T2> LessThan()
BinaryPredicate that returns true if x is less than y.
x and y must implement the java.lang.Comparable interface.
public static <T1,T2> BinaryPredicate<T1,T2> LessThanEquals()
BinaryPredicate that returns true if x is less than or equal to y.
x and y must implement the java.lang.Comparable interface.
public static <T1,T2> BinaryPredicate<T1,T2> NotEqualTo()
true if not(x.equals(y)), (x == null) && not(y == null) or not(x == null) && (y == null)
public static <T1,T2> BinaryPredicate<T1,T2> Not(BinaryPredicate<T1,T2> pred)
BinaryPredicate which is the logical negation of some other BinaryPredicate. If n
is a Not object, and pred is the Predicate it was constructed with,
then n.test(x,y) returns !pred.test(x,y).
public static <T1,T2> BinaryPredicate<T1,T2> And(BinaryPredicate<T1,T2> pred1,
BinaryPredicate<T1,T2> pred2)
BinaryPredicate which returns the logical AND of two other BinaryPredicate. If a
is an And object, constructed with pred1 and pred2, then
a.test(x,y) returns pred1.test(x,y) && pred2.test(x,y)
public static <T1,T2> BinaryPredicate<T1,T2> Or(BinaryPredicate<T1,T2> pred1,
BinaryPredicate<T1,T2> pred2)
BinaryPredicate which returns the logical OR of two other BinaryPredicate. If a
is an Or object, constructed with pred1 and pred2, then
a.test(x,y) returns pred1.test(x,y) || pred2.test(x,y)
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||