Package net.jqwik.time.api.arbitraries
Interface DateArbitrary
-
- All Superinterfaces:
Arbitrary<java.util.Date>
@API(status=EXPERIMENTAL, since="1.4.0") public interface DateArbitrary extends Arbitrary<java.util.Date>
Fluent interface to configure the generation of date values. All generated dates use the Gregorian Calendar, even if they are before October 15, 1582. By default, dates with years between 1900 and 2500 are generated.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.jqwik.api.Arbitrary
Arbitrary.ArbitraryFacade
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description DateArbitrary
atTheEarliest(java.util.Date min)
Set the allowed lowermin
(included) bounder of generated date values.DateArbitrary
atTheLatest(java.util.Date max)
Set the allowed uppermax
(included) bounder of generated date values.default DateArbitrary
between(java.util.Date min, java.util.Date max)
Set the allowed lowermin
(included) and uppermax
(included) bounder of generated date values.DateArbitrary
dayOfMonthBetween(int min, int max)
Set the allowed lowermin
(included) and uppermax
(included) bounder of generated day of month values.default DateArbitrary
monthBetween(int min, int max)
Set the allowed lowermin
(included) and uppermax
(included) bounder of generated month values.DateArbitrary
monthBetween(java.time.Month min, java.time.Month max)
Set the allowed lowermin
(included) and uppermax
(included) bounder of generated month values.DateArbitrary
onlyDaysOfWeek(java.time.DayOfWeek... daysOfWeek)
Set an array of alloweddaysOfWeek
.DateArbitrary
onlyMonths(java.time.Month... months)
Set an array of allowedmonths
.default DateArbitrary
yearBetween(int min, int max)
Set the allowed lowermin
(included) and uppermax
(included) bounder of generated year values.DateArbitrary
yearBetween(java.time.Year min, java.time.Year max)
Set the allowed lowermin
(included) and uppermax
(included) bounder of generated year values.-
Methods inherited from interface net.jqwik.api.Arbitrary
allValues, array, asGeneric, collect, dontShrink, edgeCases, edgeCases, edgeCases, exhaustive, exhaustive, filter, filter, fixGenSize, flatMap, forEachValue, generator, generator, generatorWithEmbeddedEdgeCases, ignoreException, injectDuplicates, injectNull, iterator, list, map, optional, optional, sample, sampleStream, set, stream, tuple1, tuple2, tuple3, tuple4, tuple5, withoutEdgeCases
-
-
-
-
Method Detail
-
between
default DateArbitrary between(java.util.Date min, java.util.Date max)
Set the allowed lowermin
(included) and uppermax
(included) bounder of generated date values.
-
atTheEarliest
DateArbitrary atTheEarliest(java.util.Date min)
Set the allowed lowermin
(included) bounder of generated date values.
-
atTheLatest
DateArbitrary atTheLatest(java.util.Date max)
Set the allowed uppermax
(included) bounder of generated date values.
-
yearBetween
DateArbitrary yearBetween(java.time.Year min, java.time.Year max)
Set the allowed lowermin
(included) and uppermax
(included) bounder of generated year values. The years can be between1
andYear.MAX_VALUE
.Calling this method is equivalent to calling between(Date, Date) assuming Jan 1 and Dec 31 as first and last day of those years.
-
yearBetween
default DateArbitrary yearBetween(int min, int max)
Set the allowed lowermin
(included) and uppermax
(included) bounder of generated year values. Theint
values can be between1
andYear.MAX_VALUE
.Calling this method is equivalent to calling between(Date, Date) assuming Jan 1 and Dec 31 as first and last day of those years.
-
monthBetween
DateArbitrary monthBetween(java.time.Month min, java.time.Month max)
Set the allowed lowermin
(included) and uppermax
(included) bounder of generated month values.
-
monthBetween
default DateArbitrary monthBetween(int min, int max)
Set the allowed lowermin
(included) and uppermax
(included) bounder of generated month values. Theint
values can be between 1 and 12.
-
onlyMonths
DateArbitrary onlyMonths(java.time.Month... months)
Set an array of allowedmonths
.
-
dayOfMonthBetween
DateArbitrary dayOfMonthBetween(int min, int max)
Set the allowed lowermin
(included) and uppermax
(included) bounder of generated day of month values. Theint
values can be between 1 and 31.
-
onlyDaysOfWeek
DateArbitrary onlyDaysOfWeek(java.time.DayOfWeek... daysOfWeek)
Set an array of alloweddaysOfWeek
.
-
-