org.databene.benerator.sample
Class SequenceGenerator<E>
java.lang.Object
org.databene.benerator.util.AbstractGenerator<E>
org.databene.benerator.util.ThreadSafeGenerator<E>
org.databene.benerator.sample.SequenceGenerator<E>
- All Implemented Interfaces:
- java.io.Closeable, Generator<E>, org.databene.commons.Resettable, org.databene.commons.ThreadAware
public class SequenceGenerator<E>
- extends ThreadSafeGenerator<E>
Creates a predefined sequence of objects.
Created: 19.11.2007 15:21:24
- Author:
- Volker Bergmann
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
SequenceGenerator
public SequenceGenerator(java.lang.Class<E> productType,
E... values)
SequenceGenerator
public SequenceGenerator(java.lang.Class<E> productType,
java.util.Collection<? extends E> values)
addValue
public void addValue(E value)
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 ProductWrapper<E> generate(ProductWrapper<E> wrapper)
- Description copied from interface:
Generator
- Returns an instance of the generic type E, using the
ProductWrapper
instance provided as argument.
The wrapper may wrap a null value as a regular generator product.
If the generator is not available (any more), it returns null instead of
the ProductWrapper instance.
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 © 2013. All Rights Reserved.