|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.functor.core.composite.AbstractLoopProcedure
org.apache.commons.functor.core.composite.WhileDoProcedure
public class WhileDoProcedure
A 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 Summary | |
|---|---|
WhileDoProcedure(Predicate condition,
Procedure action)
Create a new WhileDoProcedure. |
|
| Method Summary | |
|---|---|
void |
run()
Execute this procedure. |
String |
toString()
Returns a human readable description of this functor. |
| Methods inherited from class org.apache.commons.functor.core.composite.AbstractLoopProcedure |
|---|
equals, getAction, getCondition, hashCode, hashCode |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public WhileDoProcedure(Predicate condition,
Procedure action)
condition - whileaction - to do| Method Detail |
|---|
public void run()
public String toString()
Object
implementation of this method.
toString in interface FunctortoString in class AbstractLoopProcedure
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||