Interface DurationGeneratorSpec

All Superinterfaces:
GeneratorSpec<Duration>
All Known Implementing Classes:
DurationGenerator

public interface DurationGeneratorSpec extends GeneratorSpec<Duration>
Generator spec for Duration.
Since:
1.5.4
  • Method Details

    • of

      DurationGeneratorSpec of(long minAmount, long maxAmount, TemporalUnit unit)
      Generate a Duration in the given range, measured in specified units.
      Parameters:
      minAmount - minimum duration amount (inclusive)
      maxAmount - maximum duration amount (inclusive)
      unit - unit the duration is measured in
      Returns:
      spec builder
      Since:
      1.5.4
    • allowZero

      Allow a Duration of length zero to be generated.
      Returns:
      spec builder
      Since:
      1.5.4