|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
E
- the type of elements held in this generator.public interface Generator<E>
The Generator interface defines a number of useful actions applying UnaryFunctors to each in a series of argument Objects.
Method Summary | ||
---|---|---|
boolean |
isStopped()
Check if the generator is stopped. |
|
void |
run(UnaryProcedure<? super E> proc)
Generators must implement this method. |
|
void |
stop()
Stop the generator. |
|
Collection<? super E> |
to(Collection<? super E> collection)
Same as to(new CollectionTransformer(collection)). |
|
|
to(UnaryFunction<Generator<? extends E>,? extends Z> transformer)
Transforms this generator using the passed in transformer. |
|
Collection<? super E> |
toCollection()
Same as to(new CollectionTransformer()). |
Method Detail |
---|
void run(UnaryProcedure<? super E> proc)
proc
- UnaryProcedure to runvoid stop()
boolean isStopped()
<Z> Z to(UnaryFunction<Generator<? extends E>,? extends Z> transformer)
Collection
of elements.
Z
- the returned value type of the input UnaryFunction
.transformer
- UnaryFunction to apply to this
Collection<? super E> to(Collection<? super E> collection)
collection
- Collection to which my elements should be added
collection
Collection<? super E> toCollection()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |