Package net.jqwik.time.api.arbitraries
Interface LocalDateTimeArbitrary
-
- All Superinterfaces:
Arbitrary<java.time.LocalDateTime>
@API(status=EXPERIMENTAL, since="1.5.1") public interface LocalDateTimeArbitrary extends Arbitrary<java.time.LocalDateTime>
Fluent interface to configure the generation of local date time values. All generated date times use the Gregorian Calendar, even if they are before October 15, 1582. By default, local date times 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 LocalDateTimeArbitrary
atTheEarliest(java.time.LocalDateTime min)
Set the allowed lowermin
(included) bounder of generated local date time values.LocalDateTimeArbitrary
atTheLatest(java.time.LocalDateTime max)
Set the allowed uppermax
(included) bounder of generated local date time values.default LocalDateTimeArbitrary
between(java.time.LocalDateTime min, java.time.LocalDateTime max)
Set the allowed lowermin
(included) and uppermax
(included) bounder of generated local date time values.LocalDateTimeArbitrary
dateBetween(java.time.LocalDate min, java.time.LocalDate max)
Set the allowed lowermin
(included) and uppermax
(included) bounder of generated local date values.LocalDateTimeArbitrary
dayOfMonthBetween(int min, int max)
Set the allowed lowermin
(included) and uppermax
(included) bounder of generated day of month values.LocalDateTimeArbitrary
hourBetween(int min, int max)
Set the allowed lowermin
(included) and uppermax
(included) bounder of generated hour values.LocalDateTimeArbitrary
minuteBetween(int min, int max)
Set the allowed lowermin
(included) and uppermax
(included) bounder of generated minute values.default LocalDateTimeArbitrary
monthBetween(int min, int max)
Set the allowed lowermin
(included) and uppermax
(included) bounder of generated month values.LocalDateTimeArbitrary
monthBetween(java.time.Month min, java.time.Month max)
Set the allowed lowermin
(included) and uppermax
(included) bounder of generated month values.LocalDateTimeArbitrary
ofPrecision(java.time.temporal.ChronoUnit ofPrecision)
Constrain the precision of generated values.LocalDateTimeArbitrary
onlyDaysOfWeek(java.time.DayOfWeek... daysOfWeek)
Set an array of alloweddaysOfWeek
.LocalDateTimeArbitrary
onlyMonths(java.time.Month... months)
Set an array of allowedmonths
.LocalDateTimeArbitrary
secondBetween(int min, int max)
Set the allowed lowermin
(included) and uppermax
(included) bounder of generated second values.LocalDateTimeArbitrary
timeBetween(java.time.LocalTime min, java.time.LocalTime max)
Set the allowed lowermin
(included) and uppermax
(included) bounder of generated local time values.default LocalDateTimeArbitrary
yearBetween(int min, int max)
Set the allowed lowermin
(included) and uppermax
(included) bounder of generated year values.LocalDateTimeArbitrary
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, fixGenSize, flatMap, forEachValue, generator, generator, generatorWithEmbeddedEdgeCases, ignoreException, injectDuplicates, injectNull, iterator, list, map, optional, sample, sampleStream, set, stream, tuple1, tuple2, tuple3, tuple4, tuple5, withoutEdgeCases
-
-
-
-
Method Detail
-
between
default LocalDateTimeArbitrary between(java.time.LocalDateTime min, java.time.LocalDateTime max)
Set the allowed lowermin
(included) and uppermax
(included) bounder of generated local 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
LocalDateTimeArbitrary atTheEarliest(java.time.LocalDateTime min)
Set the allowed lowermin
(included) bounder of generated local 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
LocalDateTimeArbitrary atTheLatest(java.time.LocalDateTime max)
Set the allowed uppermax
(included) bounder of generated local 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
@API(status=EXPERIMENTAL, since="1.5.2") LocalDateTimeArbitrary dateBetween(java.time.LocalDate min, java.time.LocalDate max)
Set the allowed lowermin
(included) and uppermax
(included) bounder of generated local date values.
-
yearBetween
@API(status=EXPERIMENTAL, since="1.5.2") LocalDateTimeArbitrary 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 dateBetween(LocalDate, LocalDate) assuming Jan 1 and Dec 31 as first and last day of those years.
-
yearBetween
@API(status=EXPERIMENTAL, since="1.5.2") default LocalDateTimeArbitrary 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 dateBetween(LocalDate, LocalDate) assuming Jan 1 and Dec 31 as first and last day of those years.
-
monthBetween
@API(status=EXPERIMENTAL, since="1.5.2") LocalDateTimeArbitrary monthBetween(java.time.Month min, java.time.Month max)
Set the allowed lowermin
(included) and uppermax
(included) bounder of generated month values.
-
monthBetween
@API(status=EXPERIMENTAL, since="1.5.2") default LocalDateTimeArbitrary 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
@API(status=EXPERIMENTAL, since="1.5.2") LocalDateTimeArbitrary onlyMonths(java.time.Month... months)
Set an array of allowedmonths
.
-
dayOfMonthBetween
@API(status=EXPERIMENTAL, since="1.5.2") LocalDateTimeArbitrary 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
@API(status=EXPERIMENTAL, since="1.5.2") LocalDateTimeArbitrary onlyDaysOfWeek(java.time.DayOfWeek... daysOfWeek)
Set an array of alloweddaysOfWeek
.
-
timeBetween
@API(status=EXPERIMENTAL, since="1.5.2") LocalDateTimeArbitrary timeBetween(java.time.LocalTime min, java.time.LocalTime max)
Set the allowed lowermin
(included) and uppermax
(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.
-
hourBetween
@API(status=EXPERIMENTAL, since="1.5.2") LocalDateTimeArbitrary hourBetween(int min, int max)
Set the allowed lowermin
(included) and uppermax
(included) bounder of generated hour values. The hours can be between0
and23
.
-
minuteBetween
@API(status=EXPERIMENTAL, since="1.5.2") LocalDateTimeArbitrary minuteBetween(int min, int max)
Set the allowed lowermin
(included) and uppermax
(included) bounder of generated minute values. The minutes can be between0
and59
.
-
secondBetween
@API(status=EXPERIMENTAL, since="1.5.2") LocalDateTimeArbitrary secondBetween(int min, int max)
Set the allowed lowermin
(included) and uppermax
(included) bounder of generated second values. The minutes can be between0
and59
.
-
ofPrecision
@API(status=EXPERIMENTAL, since="1.5.2") LocalDateTimeArbitrary ofPrecision(java.time.temporal.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.
-
-