E - the type of elements held in this generator.public interface Generator<E>
| Modifier and Type | Method and Description |
|---|---|
boolean |
isStopped()
Check if the generator is stopped.
|
void |
run(UnaryProcedure<? super E> proc)
Generators must implement this method.
|
void |
stop()
Stop the generator.
|
<C extends Collection<? super E>> |
to(C collection)
Same as to(new CollectionTransformer(collection)).
|
<Z> Z |
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()).
|
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<C extends Collection<? super E>> C to(C collection)
collection - Collection to which my elements should be addedcollectionCollection<? super E> toCollection()
Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.