L
- the left argument type.R
- the right argument type.public final class ConditionalBinaryPredicate<L,R> extends Object implements BinaryPredicate<L,R>
BinaryPredicate
similiar to Java's "ternary"
or "conditional" operator (? :
).
Given three predicates
p, q, r,
tests
to
p.test(x,y) ? q.test(x,y) : r.test(x,y)
.Constructor and Description |
---|
ConditionalBinaryPredicate(BinaryPredicate<? super L,? super R> ifPred,
BinaryPredicate<? super L,? super R> thenPred,
BinaryPredicate<? super L,? super R> elsePred)
Create a new ConditionalBinaryPredicate.
|
public ConditionalBinaryPredicate(BinaryPredicate<? super L,? super R> ifPred, BinaryPredicate<? super L,? super R> thenPred, BinaryPredicate<? super L,? super R> elsePred)
ifPred
- ifthenPred
- thenelsePred
- elsepublic 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 argumentsCopyright © 2003–2014 The Apache Software Foundation. All rights reserved.