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-
Fields inherited from class net.andreinc.mockneat.abstraction.MockUnitBase
mockNeat
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedLocalDates()LocalDates(MockNeat mockNeat)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods 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, wait
-
Methods 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, valStr
-
Methods inherited from interface net.andreinc.mockneat.abstraction.MockUnitLocalDate
display, display, display, display, mapToDate, toUtilDate
-
-
-
-
Constructor Detail
-
LocalDates
protected LocalDates()
-
LocalDates
public LocalDates(MockNeat mockNeat)
-
-
Method Detail
-
localDates
public static LocalDates 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
public MockUnitLocalDate thisYear()
This method can be used to generate date objects from the current year.
- Returns:
- A new
MockUnitLocalDateobject.
-
thisMonth
public MockUnitLocalDate thisMonth()
This method can be used to generate date objects from the current month.
- Returns:
- A new
MockUnitLocalDateobject.
-
between
public MockUnitLocalDate between(java.time.LocalDate lowerDate, java.time.LocalDate upperDate)
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
public MockUnitLocalDate future(java.time.LocalDate maxDate)
This method can be used to generate date objects in the future.
- Parameters:
maxDate- The maxDate from the future.- Returns:
- A new
MockUnitLocalDateobject.
-
past
public MockUnitLocalDate past(java.time.LocalDate minDate)
This method can be used to generate date objects in the past.
- Parameters:
minDate- The minDate from the past.- Returns:
- A new
MockUnitLocalDate.
-
-