Class ZonedDateTimeGenerator
java.lang.Object
org.instancio.internal.generator.AbstractGenerator<T>
org.instancio.internal.generator.time.ZonedDateTimeGenerator
- All Implemented Interfaces:
AsStringGeneratorSpec<ZonedDateTime>
,Generator<ZonedDateTime>
,GeneratorSpec<ZonedDateTime>
,NullableGeneratorSpec<ZonedDateTime>
,TemporalAaStringGeneratorSpec<ZonedDateTime>
,TemporalGeneratorSpec<ZonedDateTime>
,TemporalSpec<ZonedDateTime>
,ZonedDateTimeSpec
,ValueSpec<ZonedDateTime>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the public API method name of the generator spec.future()
Generate a value in the future.final ZonedDateTime
Returns a generated value.generateNonNullValue
(Random random) nullable()
Indicates thatnull
value can be generated.past()
Generate a value in the past.range
(ZonedDateTime start, ZonedDateTime end) Generate a value within the given range.Methods inherited from class org.instancio.internal.generator.AbstractGenerator
getContext, hints, isNullable, nullable
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.instancio.generator.AsStringGeneratorSpec
asString, asString
-
Field Details
-
min
-
max
-
-
Constructor Details
-
ZonedDateTimeGenerator
public ZonedDateTimeGenerator() -
ZonedDateTimeGenerator
-
-
Method Details
-
apiMethod
Description copied from class:AbstractGenerator
Returns the public API method name of the generator spec. The returned name is used for reporting validation errors.- Specified by:
apiMethod
in classAbstractGenerator<ZonedDateTime>
- Returns:
- spec name if defined, or
null
otherwise
-
past
Description copied from interface:TemporalGeneratorSpec
Generate a value in the past.- Specified by:
past
in interfaceTemporalAaStringGeneratorSpec<ZonedDateTime>
- Specified by:
past
in interfaceTemporalGeneratorSpec<ZonedDateTime>
- Specified by:
past
in interfaceTemporalSpec<ZonedDateTime>
- Specified by:
past
in interfaceZonedDateTimeSpec
- Returns:
- spec builder
-
future
Description copied from interface:TemporalGeneratorSpec
Generate a value in the future.- Specified by:
future
in interfaceTemporalAaStringGeneratorSpec<ZonedDateTime>
- Specified by:
future
in interfaceTemporalGeneratorSpec<ZonedDateTime>
- Specified by:
future
in interfaceTemporalSpec<ZonedDateTime>
- Specified by:
future
in interfaceZonedDateTimeSpec
- Returns:
- spec builder
-
range
Description copied from interface:TemporalGeneratorSpec
Generate a value within the given range.- Specified by:
range
in interfaceTemporalAaStringGeneratorSpec<ZonedDateTime>
- Specified by:
range
in interfaceTemporalGeneratorSpec<ZonedDateTime>
- Specified by:
range
in interfaceTemporalSpec<ZonedDateTime>
- Specified by:
range
in interfaceZonedDateTimeSpec
- Parameters:
start
- lower bound (inclusive)end
- upper bound (inclusive)- Returns:
- spec builder
-
nullable
Description copied from interface:NullableGeneratorSpec
Indicates thatnull
value can be generated.- Specified by:
nullable
in interfaceNullableGeneratorSpec<ZonedDateTime>
- Specified by:
nullable
in interfaceTemporalGeneratorSpec<ZonedDateTime>
- Specified by:
nullable
in interfaceTemporalSpec<ZonedDateTime>
- Specified by:
nullable
in interfaceZonedDateTimeSpec
- Overrides:
nullable
in classAbstractGenerator<ZonedDateTime>
- Returns:
- spec builder
-
generateNonNullValue
-
generate
Description copied from interface:Generator
Returns a generated value.If this method produces random data, the data needs to be generated using the provided
Random
instance. This ensures generated values are reproducible for a given seed value.
-