Class ZonedDateTimeGenerator
java.lang.Object
com.pholser.junit.quickcheck.generator.Generator<ZonedDateTime>
com.pholser.junit.quickcheck.generator.java.time.ZonedDateTimeGenerator
- All Implemented Interfaces:
Gen<ZonedDateTime>,Shrink<ZonedDateTime>
Produces values of type
ZonedDateTime.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ZonedDateTimeprivate ZonedDateTimeprivate static final ZoneId -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidgenerate(SourceOfRandomness random, GenerationStatus status) Generates a value, possibly influenced by a source of randomness and metadata about the generation.Methods inherited from class com.pholser.junit.quickcheck.generator.Generator
addComponentGenerators, canGenerateForParametersOfTypes, canRegisterAsType, canShrink, compatibleWithTypeParameter, configurationAnnotationsOn, configure, configure, copy, doShrink, gen, gen, hasComponents, magnitude, narrow, numberOfNeededComponents, provide, shrink, types
-
Field Details
-
UTC_ZONE_ID
-
min
-
max
-
-
Constructor Details
-
ZonedDateTimeGenerator
public ZonedDateTimeGenerator()
-
-
Method Details
-
configure
Tells this generator to produce values within a specified minimum and/or maximum, inclusive, with uniform distribution, down to the nanosecond.
If an endpoint of the range is not specified, the generator will use dates with values of either
Instant.MINorInstant.MAXand UTC zone as appropriate.InRange.format()describes how the generator is to interpret the range's endpoints.- Parameters:
range- annotation that gives the range's constraints
-
generate
Description copied from interface:GenGenerates a value, possibly influenced by a source of randomness and metadata about the generation.- Parameters:
random- source of randomness to be used when generating the valuestatus- an object that can be used to influence the generated value. For example, generating lists can use thesizemethod to generate lists with a given number of elements.- Returns:
- the generated value
-