|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.databene.benerator.util.AbstractGenerator<P>
org.databene.benerator.wrapper.GeneratorWrapper<S,P>
org.databene.benerator.wrapper.NonNullGeneratorWrapper<java.lang.Long,java.util.Date>
org.databene.benerator.primitive.datetime.DateGenerator
public class DateGenerator
creates date values by a LongGenerator.
Created: 07.06.2006 22:54:28
Field Summary |
---|
Fields inherited from class org.databene.benerator.util.AbstractGenerator |
---|
context, logger, state |
Constructor Summary | |
---|---|
DateGenerator()
Initializes the generator to create days within about the last 80 years with a one-day resolution |
|
DateGenerator(java.util.Date min,
java.util.Date max,
long granularity)
Initializes the generator to create dates with a uniform distribution |
|
DateGenerator(java.util.Date min,
java.util.Date max,
long granularity,
Distribution distribution)
Initializes the generator to create dates of a Sequence or WeightFunction |
|
DateGenerator(java.util.Date min,
java.util.Date max,
long granularity,
Distribution distribution,
boolean unique)
Initializes the generator to create dates of a Sequence or WeightFunction |
Method Summary | |
---|---|
java.util.Date |
generate()
Generates a Date by creating a millisecond value from the source generator and wrapping it into a Date |
java.lang.Class<java.util.Date> |
getGeneratedType()
Declares the type of the objects returned by the generate() method. |
void |
init(GeneratorContext context)
|
boolean |
isParallelizable()
|
boolean |
isThreadSafe()
|
void |
setDistribution(Distribution distribution)
Sets the distribution to use |
void |
setGranularity(java.lang.String granularity)
Sets the date granularity in milliseconds |
void |
setMax(java.util.Date max)
Sets the latest date to generate |
void |
setMin(java.util.Date min)
Sets the earliest date to generate |
java.lang.String |
toString()
|
Methods inherited from class org.databene.benerator.wrapper.NonNullGeneratorWrapper |
---|
generate, generateFromNotNullSource, getSource, setSource |
Methods inherited from class org.databene.benerator.wrapper.GeneratorWrapper |
---|
close, equals, generateFromSource, getSourceWrapper, hashCode, reset, setSource |
Methods inherited from class org.databene.benerator.util.AbstractGenerator |
---|
assertInitialized, assertNotInitialized, getResultWrapper, wasInitialized |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.databene.benerator.Generator |
---|
close, wasInitialized |
Methods inherited from interface org.databene.commons.Resettable |
---|
reset |
Constructor Detail |
---|
public DateGenerator()
public DateGenerator(java.util.Date min, java.util.Date max, long granularity)
public DateGenerator(java.util.Date min, java.util.Date max, long granularity, Distribution distribution)
public DateGenerator(java.util.Date min, java.util.Date max, long granularity, Distribution distribution, boolean unique)
Method Detail |
---|
public void setMin(java.util.Date min)
public void setMax(java.util.Date max)
public void setGranularity(java.lang.String granularity)
public void setDistribution(Distribution distribution)
public java.lang.Class<java.util.Date> getGeneratedType()
Generator
public void init(GeneratorContext context)
init
in interface Generator<java.util.Date>
init
in class GeneratorWrapper<java.lang.Long,java.util.Date>
public java.util.Date generate()
public boolean isThreadSafe()
isThreadSafe
in interface org.databene.commons.ThreadAware
isThreadSafe
in class GeneratorWrapper<java.lang.Long,java.util.Date>
public boolean isParallelizable()
isParallelizable
in interface org.databene.commons.ThreadAware
isParallelizable
in class GeneratorWrapper<java.lang.Long,java.util.Date>
public java.lang.String toString()
toString
in class GeneratorWrapper<java.lang.Long,java.util.Date>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |