|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.functor.generator.BaseGenerator<E> org.apache.commons.functor.generator.WhileGenerate<E>
public class WhileGenerate<E>
Wrap another Generator
such that run(UnaryProcedure)
continues
as long as a condition is true (test before).
Constructor Summary | |
---|---|
WhileGenerate(UnaryPredicate<? super E> test,
Generator<? extends E> wrapped)
Create a new WhileGenerate. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
protected Generator<? extends E> |
getWrappedGenerator()
Get the generator that is being wrapped. |
int |
hashCode()
|
void |
run(UnaryProcedure<? super E> proc)
Generators must implement this method. |
Methods inherited from class org.apache.commons.functor.generator.BaseGenerator |
---|
isStopped, stop, to, to, toCollection |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WhileGenerate(UnaryPredicate<? super E> test, Generator<? extends E> wrapped)
test
- UnaryPredicate
wrapped
- Generator
Method Detail |
---|
public void run(UnaryProcedure<? super E> proc)
proc
- UnaryProcedure to runprotected Generator<? extends E> getWrappedGenerator()
getWrappedGenerator
in class BaseGenerator<E>
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |