Package net.andreinc.mockneat.unit.time
Class Months
java.lang.Object
net.andreinc.mockneat.abstraction.MockUnitBase
net.andreinc.mockneat.unit.time.Months
- All Implemented Interfaces:
MockUnit<java.time.Month>,MockUnitMonth
public class Months extends MockUnitBase implements MockUnitMonth
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description MockUnitMonthafter(java.time.Month after)Returns a newMockUnitMonththat can be used to generateMonthobjects after a given month: (after, December].MockUnitMonthbefore(java.time.Month before)Returns a newMockUnitMonththat can be used to generateMonthobjects before a given month: [January, before).static Monthsmonths()Returns aMonthsobject that can be used to generate arbitraryMonthobjects.MockUnitMonthrange(java.time.Month lower, java.time.Month upper)Returns a newMockUnitMonththat can be used to generateMonthobjects in a given range: [lower, upper)MockUnitMonthrangeClosed(java.time.Month lower, java.time.Month upper)Returns a newMockUnitMonththat can be used to generateMonthobjects in the given range: [lower, upper].java.util.function.Supplier<java.time.Month>supplier()This is the sole abstract method of the interface.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.MockUnitMonth
display, display, display
-
Constructor Details
-
Method Details
-
months
Returns a
Monthsobject that can be used to generate arbitraryMonthobjects.- Returns:
- A re-usable
Monthsobject. TheMonthsclass implementsMockUnitMonth.
-
supplier
public java.util.function.Supplier<java.time.Month> supplier()Description copied from interface:MockUnitThis is the sole abstract method of the interface. Needs to be implemented every-time a MockUnit is implemented. -
rangeClosed
Returns a new
MockUnitMonththat can be used to generateMonthobjects in the given range: [lower, upper].- Parameters:
lower- The lower bound of the interval.upper- The upper bound of the interval.- Returns:
- A new
MockUnitMonth
-
range
Returns a new
MockUnitMonththat can be used to generateMonthobjects in a given range: [lower, upper)- Parameters:
lower- The upper bound of the interval.upper- The lower bound of the interval.- Returns:
- A new
MockUnitMonthobject.
-
before
Returns a new
MockUnitMonththat can be used to generateMonthobjects before a given month: [January, before).- Parameters:
before- The upper bound of the interval.- Returns:
- A new
MockUnitMonthobject.
-
after
Returns a new
MockUnitMonththat can be used to generateMonthobjects after a given month: (after, December].- Parameters:
after- The lower bound of the interval.- Returns:
- A new
MockUnitMonthobject.
-