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
-
Fields inherited from class net.andreinc.mockneat.abstraction.MockUnitBase
mockNeat
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods 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, 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.MockUnitMonth
display, display, display
-
-
-
-
Constructor Detail
-
Months
public Months(MockNeat mockNeat)
-
-
Method Detail
-
months
public static Months 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
public MockUnitMonth rangeClosed(java.time.Month lower, java.time.Month upper)
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
public MockUnitMonth range(java.time.Month lower, java.time.Month upper)
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
public MockUnitMonth before(java.time.Month 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
public MockUnitMonth after(java.time.Month 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.
-
-