E
- the type of elements held in this generator.public final class IteratorToGeneratorAdapter<E> extends LoopGenerator<E>
Iterator
to the LoopGenerator
interface.Constructor and Description |
---|
IteratorToGeneratorAdapter(Iterator<? extends E> iter)
Create a new IteratorToGeneratorAdapter.
|
Modifier and Type | Method and Description |
---|---|
static <E> IteratorToGeneratorAdapter<E> |
adapt(Iterable<? extends E> iterable)
Adapt an Iterable to the Generator interface.
|
static <E> IteratorToGeneratorAdapter<E> |
adapt(Iterator<? extends E> iter)
Adapt an Iterator to the Generator interface.
|
boolean |
equals(Object obj) |
int |
hashCode() |
void |
run(Procedure<? super E> proc)
Generators must implement this method.
|
String |
toString() |
getWrappedGenerator, isStopped, stop
to, to, toCollection
public IteratorToGeneratorAdapter(Iterator<? extends E> iter)
iter
- Iterator to adaptpublic void run(Procedure<? super E> proc)
proc
- Procedure to runpublic static <E> IteratorToGeneratorAdapter<E> adapt(Iterator<? extends E> iter)
E
- the type of elements held in this generator.iter
- to adaptpublic static <E> IteratorToGeneratorAdapter<E> adapt(Iterable<? extends E> iterable)
E
- the type of elements held in this generator.iterable
- to adaptCopyright © 2003–2014 The Apache Software Foundation. All rights reserved.