public class WhileDoProcedure extends AbstractLoopProcedure
Procedure implementation of a while loop. Given a Predicate
c and an Procedure p, runs
while(c.test()) { p.run(); }.
Note that although this class implements
Serializable, a given instance will
only be truly Serializable if all the
underlying functors are. Attempts to serialize
an instance whose delegates are not all
Serializable will result in an exception.
| Constructor and Description |
|---|
WhileDoProcedure(Predicate condition,
Procedure action)
Create a new WhileDoProcedure.
|
| Modifier and Type | Method and Description |
|---|---|
void |
run()
Execute this procedure.
|
String |
toString() |
equals, getAction, getCondition, hashCode, hashCodepublic WhileDoProcedure(Predicate condition, Procedure action)
condition - whileaction - to dopublic void run()
public String toString()
toString in class AbstractLoopProcedureCopyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.