I - the type of elements held in the wrapped generator.E - the type of elements held in this generator.public class TransformedGenerator<I,E> extends BaseGenerator<E>
| Constructor and Description |
|---|
TransformedGenerator(Generator<? extends I> wrapped,
UnaryFunction<? super I,? extends E> func)
Create a new TransformedGenerator.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
protected Generator<? extends I> |
getWrappedGenerator()
Get the generator that is being wrapped.
|
int |
hashCode() |
void |
run(UnaryProcedure<? super E> proc)
Generators must implement this method.
|
isStopped, stop, to, to, toCollectionpublic TransformedGenerator(Generator<? extends I> wrapped, UnaryFunction<? super I,? extends E> func)
wrapped - Generator to transformfunc - UnaryFunction to apply to each elementpublic void run(UnaryProcedure<? super E> proc)
proc - UnaryProcedure to runprotected Generator<? extends I> getWrappedGenerator()
getWrappedGenerator in class BaseGenerator<E>Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.