|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jaggregate.UnaryPredicate<A>
A
- a constraint on the allowable types for the predicate's argument.public abstract class UnaryPredicate<A>
A predicate that accepts one argument.
Method Summary | ||
---|---|---|
UnaryPredicate<A> |
and(UnaryPredicate<? super A> other)
Answers a predicate that represents the logical conjunction of this predicate and another predicate. |
|
String |
describe()
Gives a string that describes the kinds of objects which match this predicate. |
|
UnaryPredicate<A> |
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(UnaryPredicate<T> 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. |
|
UnaryPredicate<A> |
or(UnaryPredicate<? super A> other)
Answers a predicate that represents the logical disjunction of this predicate and another predicate. |
|
UnaryPredicate<A> |
xor(UnaryPredicate<? super A> 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.UnaryCondition |
---|
matches |
Method Detail |
---|
public final UnaryPredicate<A> not()
matches
method
would answer true
, the inverse answers false
; and vice versa.
public static <T> UnaryPredicate<T> not(UnaryPredicate<T> predicate)
matches
method
would answer true
, the inverse answers false
; and vice versa.
T
- constraint on the types accepted by the predicatepredicate
- the predicate to invert
predicate
NullPointerException
- if predicate
is null
public final UnaryPredicate<A> or(UnaryPredicate<? super A> 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
NullPointerException
- if other
is null
public final UnaryPredicate<A> and(UnaryPredicate<? super A> 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
NullPointerException
- if other
is null
public final UnaryPredicate<A> xor(UnaryPredicate<? super A> 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
NullPointerException
- if other
is null
public String describe()
Object.toString()
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |