E
- the type of elements held in this generator.public abstract class BaseGenerator<E> extends Object implements Generator<E>
Constructor and Description |
---|
BaseGenerator()
Create a new generator.
|
Modifier and Type | Method and Description |
---|---|
<C extends Collection<? super E>> |
to(C collection)
Same as to(new CollectionTransformer(collection)).
|
<T> T |
to(Function<Generator<? extends E>,? extends T> transformer)
Transforms this generator using the passed in
transformer.
|
Collection<E> |
toCollection()
Same as to(new CollectionTransformer()).
|
public BaseGenerator()
public final <T> T to(Function<Generator<? extends E>,? extends T> transformer)
Collection
of elements.
Transforms this generator using the passed in
Function. An example function might turn the contents of the
generator into a Collection
of elements.public final <C extends Collection<? super E>> C to(C collection)
public final Collection<E> toCollection()
toCollection
in interface Generator<E>
Copyright © 2003–2014 The Apache Software Foundation. All rights reserved.