org.databene.benerator.wrapper
Class IteratingGenerator<E>

java.lang.Object
  extended by org.databene.benerator.util.AbstractGenerator<E>
      extended by org.databene.benerator.wrapper.IteratingGenerator<E>
All Implemented Interfaces:
java.io.Closeable, Generator<E>, org.databene.commons.Resettable, org.databene.commons.ThreadAware

public class IteratingGenerator<E>
extends AbstractGenerator<E>

Iterates over Iterators that are provided by an Iterable.

Created: 16.08.2007 07:09:57

Author:
Volker Bergmann

Field Summary
 
Fields inherited from class org.databene.benerator.util.AbstractGenerator
context, state
 
Constructor Summary
IteratingGenerator()
           
IteratingGenerator(org.databene.commons.TypedIterable<E> iterable)
           
 
Method Summary
 void close()
          Closes the generator.
 E generate()
          Returns an instance of the generic type E.
 java.lang.Class<E> getGeneratedType()
          Declares the type of the objects returned by the generate() method.
 org.databene.commons.TypedIterable<E> getIterable()
           
 void init(GeneratorContext context)
           
 boolean isParallelizable()
           
 boolean isThreadSafe()
           
 void reset()
           
 void setIterable(org.databene.commons.TypedIterable<E> iterable)
           
 java.lang.String toString()
           
 
Methods inherited from class org.databene.benerator.util.AbstractGenerator
assertInitialized, assertNotInitialized, wasInitialized
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IteratingGenerator

public IteratingGenerator()

IteratingGenerator

public IteratingGenerator(org.databene.commons.TypedIterable<E> iterable)
Method Detail

getIterable

public org.databene.commons.TypedIterable<E> getIterable()

setIterable

public void setIterable(org.databene.commons.TypedIterable<E> iterable)

isParallelizable

public boolean isParallelizable()

isThreadSafe

public boolean isThreadSafe()

init

public void init(GeneratorContext context)
Specified by:
init in interface Generator<E>
Overrides:
init in class AbstractGenerator<E>

getGeneratedType

public java.lang.Class<E> getGeneratedType()
Description copied from interface: Generator
Declares the type of the objects returned by the generate() method.


generate

public E generate()
Description copied from interface: Generator
Returns an instance of the generic type E.


reset

public void reset()
Specified by:
reset in interface org.databene.commons.Resettable
Overrides:
reset in class AbstractGenerator<E>

close

public void close()
Description copied from interface: Generator
Closes the generator. After invocation the state is unavailable.

Specified by:
close in interface java.io.Closeable
Specified by:
close in interface Generator<E>
Overrides:
close in class AbstractGenerator<E>

toString

public java.lang.String toString()
Overrides:
toString in class AbstractGenerator<E>


Copyright © 2011. All Rights Reserved.