Package org.refcodes.generator
Interface Generator<T>
-
- Type Parameters:
T
- the generic type
- All Superinterfaces:
java.util.Iterator<T>
- All Known Subinterfaces:
IdGenerator
- All Known Implementing Classes:
UniqueIdGeneratorImpl
,UniqueIdGeneratorSingleton
public interface Generator<T> extends java.util.Iterator<T>
AGenerator
generates objects of a dedicated type in mass production. The generated objects may have special characteristics or qualities, e.g the objects may be system wide unique from each other. These characteristics are implementation depended. TheIterator
patters has been chosen to make the generator team up with the java collections framework.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
hasNext()
T
next()
Generates a next item.
-