Package org.refcodes.generator
A generator is a value provider providing one value after the other without
further parameters required. The generator may be initialized beforehand.
After initialization, the
Generator.next()
method will get the next generated value. As the
Generator
is a generic type, you may implement
generators for many different types. An
IdGenerator
for example creates unique
String
values (unique in the scope of your infrastructure
given that you do not run the same application on the same machine more than
one).-
Interface Summary Interface Description Generator<T> AGenerator
generates objects of a dedicated type in mass production.IdGenerator The Interface IdGenerator. -
Class Summary Class Description UniqueIdGeneratorImpl TheUniqueIdGeneratorImpl
is an implementation of theGenerator
capable of generating IDString
instances unique on the system on which them were generated to IDs generated with the sameUniqueIdGeneratorImpl
on another system.UniqueIdGeneratorSingleton The Class UniqueIdGeneratorSingleton.