Interface LocalDateArbitrary

  • All Superinterfaces:
    Arbitrary<java.time.LocalDate>

    @API(status=EXPERIMENTAL,
         since="1.4.0")
    public interface LocalDateArbitrary
    extends Arbitrary<java.time.LocalDate>
    Fluent interface to configure the generation of local date values. All generated dates use the Gregorian Calendar, even if they are before October 15, 1582. By default, local dates with years between 1900 and 2500 are generated.
    • Method Detail

      • between

        default LocalDateArbitrary between​(java.time.LocalDate min,
                                           java.time.LocalDate max)
        Set the allowed lower min (included) and upper max (included) bounder of generated local date values.
      • atTheEarliest

        LocalDateArbitrary atTheEarliest​(java.time.LocalDate min)
        Set the allowed lower min (included) bounder of generated local date values.
      • atTheLatest

        LocalDateArbitrary atTheLatest​(java.time.LocalDate max)
        Set the allowed upper max (included) bounder of generated local date values.
      • yearBetween

        LocalDateArbitrary yearBetween​(java.time.Year min,
                                       java.time.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 between(LocalDate, LocalDate) assuming Jan 1 and Dec 31 as first and last day of those years.

      • yearBetween

        default LocalDateArbitrary 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 between(LocalDate, LocalDate) assuming Jan 1 and Dec 31 as first and last day of those years.

      • monthBetween

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

        default LocalDateArbitrary 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

        LocalDateArbitrary onlyMonths​(java.time.Month... months)
        Set an array of allowed months.
      • dayOfMonthBetween

        LocalDateArbitrary 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

        LocalDateArbitrary onlyDaysOfWeek​(java.time.DayOfWeek... daysOfWeek)
        Set an array of allowed daysOfWeek.