L - the left argument type.R - the right argument type.public class TransposedPredicate<L,R> extends Object implements BinaryPredicate<L,R>, Serializable
predicate.
For example, given a predicate p
and the ordered pair of arguments a,
b.
tests
p.test(b,a).
Note that although this class implements
Serializable, a given instance will
only be truly Serializable if the
underlying functor is. Attempts to serialize
an instance whose delegate is not
Serializable will result in an exception.
| Constructor and Description |
|---|
TransposedPredicate(BinaryPredicate<? super R,? super L> predicate)
Create a new TransposedPredicate.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object that) |
boolean |
equals(TransposedPredicate<?,?> that)
Learn whether another TransposedPredicate is equal to this.
|
int |
hashCode() |
boolean |
test(L left,
R right)
Evaluate this predicate.
|
String |
toString() |
static <L,R> TransposedPredicate<R,L> |
transpose(BinaryPredicate<? super L,? super R> p)
Return the transposition of
p. |
public TransposedPredicate(BinaryPredicate<? super R,? super L> predicate)
predicate - the BinaryPredicate to transposepublic final boolean test(L left, R right)
test in interface BinaryPredicate<L,R>left - the L element of the ordered pair of argumentsright - the R element of the ordered pair of argumentspublic boolean equals(TransposedPredicate<?,?> that)
that - the TransposedPredicate to testpublic static <L,R> TransposedPredicate<R,L> transpose(BinaryPredicate<? super L,? super R> p)
p.L - the left argument type.R - the right argument type.p - BinaryPredicate to transposeCopyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.