|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jaggregate.BinaryPredicate<A1,A2>
A1
- a constraint on the allowable types for the predicate's first argumentA2
- a constraint on the allowable types for the predicate's second argumentpublic abstract class BinaryPredicate<A1,A2>
A predicate that accepts two arguments.
Method Summary | ||
---|---|---|
BinaryPredicate<A1,A2> |
and(BinaryPredicate<? super A1,? super A2> other)
Answers a predicate that represents the logical conjunction of this predicate and another predicate. |
|
UnaryPredicate<A2> |
bindFirst(A1 boundArgument)
Answers a predicate of one argument that matches in the same manner as this predicate would if evaluated using a fixed first argument and another argument. |
|
UnaryPredicate<A1> |
bindSecond(A2 boundArgument)
Answers a predicate of one argument that matches in the same manner as this predicate would if evaluated using a fixed second argument and another argument. |
|
String |
describe()
Gives a string that describes the kinds of objects which match this predicate. |
|
BinaryPredicate<A1,A2> |
not()
Answers a predicate that represents the logical inverse of this predicate; wherever this predicate's matches
method would answer true , the inverse answers false ; and vice
versa. |
|
static
|
not(BinaryPredicate<T,U> predicate)
Answers a predicate that represents the logical inverse of the given predicate; wherever the given predicate's matches
method would answer true , the inverse answers false ; and vice
versa. |
|
BinaryPredicate<A1,A2> |
or(BinaryPredicate<? super A1,? super A2> other)
Answers a predicate that represents the logical disjunction of this predicate and another predicate. |
|
BinaryPredicate<A1,A2> |
xor(BinaryPredicate<? super A1,? super A2> other)
Answers a predicate that represents the logical exclusive disjunction of this predicate and another predicate. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface jaggregate.BinaryCondition |
---|
matches |
Method Detail |
---|
public final BinaryPredicate<A1,A2> not()
matches
method would answer true
, the inverse answers false
; and vice
versa.
public static <T,U> BinaryPredicate<T,U> not(BinaryPredicate<T,U> predicate)
matches
method would answer true
, the inverse answers false
; and vice
versa.
T
- constraint on the first type accepted by the predicateU
- constraint on the second type accepted by the predicatepredicate
- the predicate to invert
predicate
NullPointerException
- if predicate
is null
public final BinaryPredicate<A1,A2> or(BinaryPredicate<? super A1,? super A2> other)
matches
method answers true
if either this predicate or the other
predicate would answer true
.
When the disjunction is evaluated, this predicate is always evaluated first.
The other predicate may not be evaluated; so do not depend on its evaluation for
side effects.
other
- the "right-hand" operand of the disjunction
other
public final BinaryPredicate<A1,A2> and(BinaryPredicate<? super A1,? super A2> other)
matches
method answers true
if both this predicate and the
other predicate would answer true
.
When the conjunction is evaluated, this predicate is always evaluated first.
The other predicate may not be evaluated; so do not depend on its evaluation for
side effects.
other
- the "right-hand" operand of the conjunction
other
public final BinaryPredicate<A1,A2> xor(BinaryPredicate<? super A1,? super A2> other)
matches
method answers true
if either
this predicate or the other predicate, but not both, would answer true
.
When the disjunction is evaluated, both this predicate and the other predicate
will be evaluated.
other
- the "right-hand" operand of the disjunction
other
public final UnaryPredicate<A2> bindFirst(A1 boundArgument)
boundArgument
- the fixed argument used as the first argument to this
predicate's matches
method
boundArgument
as the first argumentpublic final UnaryPredicate<A1> bindSecond(A2 boundArgument)
boundArgument
- the fixed argument used as the second argument to this
predicate's matches
method
boundArgument
as the second argumentpublic String describe()
Object.toString()
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |