Class DefaultInstantArbitrary

java.lang.Object
net.jqwik.api.arbitraries.ArbitraryDecorator<Instant>
net.jqwik.time.internal.properties.arbitraries.DefaultInstantArbitrary
All Implemented Interfaces:
Cloneable, net.jqwik.api.Arbitrary<Instant>, InstantArbitrary

@API(status=INTERNAL) public class DefaultInstantArbitrary extends net.jqwik.api.arbitraries.ArbitraryDecorator<Instant> implements InstantArbitrary
  • Constructor Details

    • DefaultInstantArbitrary

      public DefaultInstantArbitrary()
  • Method Details

    • arbitrary

      protected net.jqwik.api.Arbitrary<Instant> arbitrary()
      Specified by:
      arbitrary in class net.jqwik.api.arbitraries.ArbitraryDecorator<Instant>
    • instantToLocalDateTime

      public static LocalDateTime instantToLocalDateTime(Instant instant)
    • atTheEarliest

      public InstantArbitrary atTheEarliest(Instant min)
      Description copied from interface: InstantArbitrary
      Set the allowed lower min (included) bounder of generated instant values. If you don't explicitly set the precision and use min/max values with precision milliseconds/microseconds/nanoseconds, the precision of your min/max value is implicitly set.
      Specified by:
      atTheEarliest in interface InstantArbitrary
    • atTheLatest

      public InstantArbitrary atTheLatest(Instant max)
      Description copied from interface: InstantArbitrary
      Set the allowed upper max (included) bounder of generated instant values. If you don't explicitly set the precision and use min/max values with precision milliseconds/microseconds/nanoseconds, the precision of your min/max value is implicitly set.
      Specified by:
      atTheLatest in interface InstantArbitrary
    • dateBetween

      public InstantArbitrary dateBetween(LocalDate min, LocalDate max)
      Description copied from interface: InstantArbitrary
      Set the allowed lower min (included) and upper max (included) bounder of generated local date values.
      Specified by:
      dateBetween in interface InstantArbitrary
    • yearBetween

      public InstantArbitrary yearBetween(Year min, Year max)
      Description copied from interface: InstantArbitrary
      Set the allowed lower min (included) and upper max (included) bounder of generated year values. The years can be between 1 and Year.MAX_VALUE.

      Calling this method is equivalent to calling InstantArbitrary.dateBetween(LocalDate, LocalDate) assuming Jan 1 and Dec 31 as first and last day of those years.

      Specified by:
      yearBetween in interface InstantArbitrary
    • monthBetween

      public InstantArbitrary monthBetween(Month min, Month max)
      Description copied from interface: InstantArbitrary
      Set the allowed lower min (included) and upper max (included) bounder of generated month values.
      Specified by:
      monthBetween in interface InstantArbitrary
    • onlyMonths

      public InstantArbitrary onlyMonths(Month... months)
      Description copied from interface: InstantArbitrary
      Set an array of allowed months.
      Specified by:
      onlyMonths in interface InstantArbitrary
    • dayOfMonthBetween

      public InstantArbitrary dayOfMonthBetween(int min, int max)
      Description copied from interface: InstantArbitrary
      Set the allowed lower min (included) and upper max (included) bounder of generated day of month values. The int values can be between 1 and 31.
      Specified by:
      dayOfMonthBetween in interface InstantArbitrary
    • onlyDaysOfWeek

      public InstantArbitrary onlyDaysOfWeek(DayOfWeek... daysOfWeek)
      Description copied from interface: InstantArbitrary
      Set an array of allowed daysOfWeek.
      Specified by:
      onlyDaysOfWeek in interface InstantArbitrary
    • timeBetween

      public InstantArbitrary timeBetween(LocalTime min, LocalTime max)
      Description copied from interface: InstantArbitrary
      Set the allowed lower min (included) and upper max (included) bounder of generated local time values. If you don't explicitly set the precision and use min/max values with precision milliseconds/microseconds/nanoseconds, the precision of your min/max value is implicitly set.
      Specified by:
      timeBetween in interface InstantArbitrary
    • hourBetween

      public InstantArbitrary hourBetween(int min, int max)
      Description copied from interface: InstantArbitrary
      Set the allowed lower min (included) and upper max (included) bounder of generated hour values. The hours can be between 0 and 23.
      Specified by:
      hourBetween in interface InstantArbitrary
    • minuteBetween

      public InstantArbitrary minuteBetween(int min, int max)
      Description copied from interface: InstantArbitrary
      Set the allowed lower min (included) and upper max (included) bounder of generated minute values. The minutes can be between 0 and 59.
      Specified by:
      minuteBetween in interface InstantArbitrary
    • secondBetween

      public InstantArbitrary secondBetween(int min, int max)
      Description copied from interface: InstantArbitrary
      Set the allowed lower min (included) and upper max (included) bounder of generated second values. The minutes can be between 0 and 59.
      Specified by:
      secondBetween in interface InstantArbitrary
    • ofPrecision

      public InstantArbitrary ofPrecision(ChronoUnit ofPrecision)
      Description copied from interface: InstantArbitrary
      Constrain the precision of generated values. Default value: Seconds. If you don't explicitly set the precision and use min/max values with precision milliseconds/microseconds/nanoseconds, the precision of your min/max value is implicitly set.
      Specified by:
      ofPrecision in interface InstantArbitrary