A
- the procedure argument type.public final class CompositeProcedure<A> extends Object implements Procedure<A>
Procedure
representing the composition of
Functions
,
"chaining" the output of one to the input
of another. For example,
new CompositeProcedure(p).of(f)
runs
to
p.run(f.evaluate(obj))
, and
new CompositeProcedure(p).of(f).of(g)
runs
p.run(f.evaluate(g.evaluate(obj)))
.Constructor and Description |
---|
CompositeProcedure(Procedure<? super A> procedure)
Create a new CompositeProcedure.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
int |
hashCode() |
<T> CompositeProcedure<T> |
of(Function<? super T,? extends A> preceding)
Fluently obtain a CompositeProcedure that runs our procedure against the result of the preceding function.
|
void |
run(A obj)
Execute this procedure.
|
String |
toString() |
public CompositeProcedure(Procedure<? super A> procedure)
procedure
- final Procedure to runpublic <T> CompositeProcedure<T> of(Function<? super T,? extends A> preceding)
T
- the input function left argument and output procedure argument typepreceding
- FunctionCopyright © 2003–2014 The Apache Software Foundation. All rights reserved.