Interface OffsetDateTimeArbitrary

All Superinterfaces:
Arbitrary<OffsetDateTime>

@API(status=EXPERIMENTAL, since="1.5.5") public interface OffsetDateTimeArbitrary extends Arbitrary<OffsetDateTime>
Fluent interface to configure the generation of offset date time values. All generated offset date times use the Gregorian Calendar, even if they are before October 15, 1582. By default, offset date times with years between 1900 and 2500 are generated.
  • Method Details

    • between

      Set the allowed lower min (included) and upper max (included) bounder of the local part of generated offset date 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.
    • atTheEarliest

      Set the allowed lower min (included) bounder of the local part of generated offset date 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.
    • atTheLatest

      Set the allowed upper max (included) bounder of the local part of generated offset date 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.
    • dateBetween

      Set the allowed lower min (included) and upper max (included) bounder of generated offset date values.
    • yearBetween

      OffsetDateTimeArbitrary yearBetween(Year min, Year max)
      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 dateBetween(LocalDate, LocalDate) assuming Jan 1 and Dec 31 as first and last day of those years.

    • yearBetween

      default OffsetDateTimeArbitrary yearBetween(int min, int max)
      Set the allowed lower min (included) and upper max (included) bounder of generated year values. The int values can be between 1 and Year.MAX_VALUE.

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

    • monthBetween

      OffsetDateTimeArbitrary monthBetween(Month min, Month max)
      Set the allowed lower min (included) and upper max (included) bounder of generated month values.
    • monthBetween

      default OffsetDateTimeArbitrary monthBetween(int min, int max)
      Set the allowed lower min (included) and upper max (included) bounder of generated month values. The int values can be between 1 and 12.
    • onlyMonths

      OffsetDateTimeArbitrary onlyMonths(Month... months)
      Set an array of allowed months.
    • dayOfMonthBetween

      OffsetDateTimeArbitrary dayOfMonthBetween(int min, int max)
      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.
    • onlyDaysOfWeek

      OffsetDateTimeArbitrary onlyDaysOfWeek(DayOfWeek... daysOfWeek)
      Set an array of allowed daysOfWeek.
    • timeBetween

      Set the allowed lower min (included) and upper max (included) bounder of generated offset 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.
    • hourBetween

      OffsetDateTimeArbitrary hourBetween(int min, int max)
      Set the allowed lower min (included) and upper max (included) bounder of generated hour values. The hours can be between 0 and 23.
    • minuteBetween

      OffsetDateTimeArbitrary minuteBetween(int min, int max)
      Set the allowed lower min (included) and upper max (included) bounder of generated minute values. The minutes can be between 0 and 59.
    • secondBetween

      OffsetDateTimeArbitrary secondBetween(int min, int max)
      Set the allowed lower min (included) and upper max (included) bounder of generated second values. The minutes can be between 0 and 59.
    • offsetBetween

      OffsetDateTimeArbitrary offsetBetween(ZoneOffset min, ZoneOffset max)
      Set the allowed lower min (included) and upper max (included) bounder of generated offset values. The offsets can be between -12:00:00 and +14:00:00.
    • ofPrecision

      OffsetDateTimeArbitrary ofPrecision(ChronoUnit ofPrecision)
      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.