L - the left argument type.R - the right argument type.public final class BinaryPredicateBinaryFunction<L,R> extends Object implements BinaryFunction<L,R,Boolean>, Serializable
BinaryPredicate
to the
BinaryFunction interface.
Note that although this class implements
Serializable, a given instance will
only be truly Serializable if the
underlying predicate is. Attempts to serialize
an instance whose delegate is not
Serializable will result in an exception.| Constructor and Description |
|---|
BinaryPredicateBinaryFunction(BinaryPredicate<? super L,? super R> predicate)
Create a new BinaryPredicateBinaryFunction.
|
| Modifier and Type | Method and Description |
|---|---|
static <L,R> BinaryPredicateBinaryFunction<L,R> |
adapt(BinaryPredicate<? super L,? super R> predicate)
|
boolean |
equals(BinaryPredicateBinaryFunction<?,?> that)
Learn whether another BinaryPredicateBinaryFunction is equal to this.
|
boolean |
equals(Object that) |
Boolean |
evaluate(L left,
R right)
Evaluate this function.
|
int |
hashCode() |
String |
toString() |
public BinaryPredicateBinaryFunction(BinaryPredicate<? super L,? super R> predicate)
predicate - to adaptpublic Boolean evaluate(L left, R right)
Boolean.TRUE (Boolean.FALSE)
when the test method of my underlying
predicate returns true (false).evaluate in interface BinaryFunction<L,R,Boolean>left - the L element of the ordered pair of argumentsright - the R element of the ordered pair of argumentsnull Boolean instancepublic boolean equals(BinaryPredicateBinaryFunction<?,?> that)
that - BinaryPredicateBinaryFunction to testpublic static <L,R> BinaryPredicateBinaryFunction<L,R> adapt(BinaryPredicate<? super L,? super R> predicate)
null,
BinaryPredicate to the
BinaryFunction interface.
When the given BinaryPredicate is null,
returns null.L - left typeR - right typepredicate - the possibly-null
BinaryPredicate to adaptBinaryPredicateBinaryFunction wrapping the given
BinaryPredicate, or null
if the given BinaryPredicate is nullCopyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.