Package net.andreinc.mockneat.unit.time
Class LocalDates
java.lang.Object
net.andreinc.mockneat.abstraction.MockUnitBase
net.andreinc.mockneat.unit.time.LocalDates
- All Implemented Interfaces:
MockUnit<java.time.LocalDate>,MockUnitLocalDate
public class LocalDates extends MockUnitBase implements MockUnitLocalDate
-
Field Summary
Fields Modifier and Type Field Description static java.time.LocalDateEPOCH_START -
Constructor Summary
Constructors Modifier Constructor Description protectedLocalDates()LocalDates(MockNeat mockNeat) -
Method Summary
Modifier and Type Method Description MockUnitLocalDatebetween(java.time.LocalDate lowerDate, java.time.LocalDate upperDate)This method can be used to generate date objects in the defined range (lowerDate, upperDate).MockUnitLocalDatefuture(java.time.LocalDate maxDate)This method can be used to generate date objects in the future.static LocalDateslocalDates()Returns aLocalDatesobject that can be used to generate arbitraryLocalDateobjects.MockUnitLocalDatepast(java.time.LocalDate minDate)This method can be used to generate date objects in the past.java.util.function.Supplier<java.time.LocalDate>supplier()This is the sole abstract method of the interface.MockUnitLocalDatethisMonth()This method can be used to generate date objects from the current month.MockUnitLocalDatethisYear()This method can be used to generate date objects from the current year.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.andreinc.mockneat.abstraction.MockUnit
array, array, collection, collection, collection, collection, collection, collection, consume, consume, get, get, list, list, list, list, list, list, map, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapKeys, mapToDouble, mapToInt, mapToLocalDate, mapToLong, mapToString, mapToString, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, mapVals, serialize, set, set, set, set, set, set, stream, val, val, valStr, valStrMethods inherited from interface net.andreinc.mockneat.abstraction.MockUnitLocalDate
display, display, display, display, mapToDate, toUtilDate
-
Field Details
-
EPOCH_START
public static final java.time.LocalDate EPOCH_START
-
-
Constructor Details
-
LocalDates
protected LocalDates() -
LocalDates
-
-
Method Details
-
localDates
Returns a
LocalDatesobject that can be used to generate arbitraryLocalDateobjects.- Returns:
- A re-usable
LocalDatesobject. TheLocalDatesimplementsMockUnitLocalDate.
-
supplier
public java.util.function.Supplier<java.time.LocalDate> supplier()Description copied from interface:MockUnitThis is the sole abstract method of the interface. Needs to be implemented every-time a MockUnit is implemented. -
thisYear
This method can be used to generate date objects from the current year.
- Returns:
- A new
MockUnitLocalDateobject.
-
thisMonth
This method can be used to generate date objects from the current month.
- Returns:
- A new
MockUnitLocalDateobject.
-
between
This method can be used to generate date objects in the defined range (lowerDate, upperDate).
- Parameters:
lowerDate- The lower limit of the interval.upperDate- The upper limit of the interval.- Returns:
- A new
MockUnitLocalDateobject.
-
future
This method can be used to generate date objects in the future.
- Parameters:
maxDate- The maxDate from the future.- Returns:
- A new
MockUnitLocalDateobject.
-
past
This method can be used to generate date objects in the past.
- Parameters:
minDate- The minDate from the past.- Returns:
- A new
MockUnitLocalDate.
-