Class ZoneOffsetGenerator

java.lang.Object
com.pholser.junit.quickcheck.generator.Generator<ZoneOffset>
com.pholser.junit.quickcheck.generator.java.time.ZoneOffsetGenerator
All Implemented Interfaces:
Gen<ZoneOffset>, Shrink<ZoneOffset>

public class ZoneOffsetGenerator extends Generator<ZoneOffset>
Produces values of type ZoneOffset.
  • Field Details

  • Constructor Details

    • ZoneOffsetGenerator

      public ZoneOffsetGenerator()
  • Method Details

    • configure

      public void configure(InRange range)

      Tells this generator to produce values within a specified minimum and/or maximum, inclusive, with uniform distribution.

      If an endpoint of the range is not specified, the generator will use ZoneOffsets with values of either ZoneOffset#MIN or ZoneOffset#MAX as appropriate.

      InRange.format() is ignored. ZoneOffsets are always parsed using their zone id.

      Parameters:
      range - annotation that gives the range's constraints
      See Also:
    • generate

      public ZoneOffset generate(SourceOfRandomness random, GenerationStatus status)
      Description copied from interface: Gen
      Generates 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 value
      status - an object that can be used to influence the generated value. For example, generating lists can use the size method to generate lists with a given number of elements.
      Returns:
      the generated value