L
- the left argument type.R
- the right argument type.public final class BinaryPredicateBinaryFunction<L,R> extends Object implements BinaryFunction<L,R,Boolean>
BinaryPredicate
to the
BinaryFunction
interface.Constructor and Description |
---|
BinaryPredicateBinaryFunction(BinaryPredicate<? super L,? super R> predicate)
Create a new BinaryPredicateBinaryFunction.
|
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 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 null
Copyright © 2003–2014 The Apache Software Foundation. All rights reserved.