A
- the argument type.public final class ConditionalProcedure<A> extends Object implements Procedure<A>
Procedure
similiar to Java's "ternary"
or "conditional" operator (? :
).
Given a predicate
p and procedures
q and r, runs
if (p.test(x)) { q.run(x); } else { r.run(x); }
.Constructor and Description |
---|
ConditionalProcedure(Predicate<? super A> ifPred,
Procedure<? super A> thenProc)
Create a new ConditionalProcedure.
|
ConditionalProcedure(Predicate<? super A> ifPred,
Procedure<? super A> thenProc,
Procedure<? super A> elseProc)
Create a new ConditionalProcedure.
|
Copyright © 2003–2014 The Apache Software Foundation. All rights reserved.