Package org.sellcom.geotemporal.time
Class MonthDays
- java.lang.Object
-
- org.sellcom.geotemporal.time.MonthDays
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisInRange(MonthDay monthDay, MonthDay startMonthDay, MonthDay endMonthDay)Checks whether the given month-day is within the range of the given month-days.static MonthDaynext(MonthDay monthDay)Returns the month-day following the given month-day.static MonthDayprevious(MonthDay monthDay)Returns the month-day preceding the given month-day.
-
-
-
Method Detail
-
isInRange
public static boolean isInRange(MonthDay monthDay, MonthDay startMonthDay, MonthDay endMonthDay)
Checks whether the given month-day is within the range of the given month-days. Both the start month-day and the end month-day are inclusive and the range may wrap around the end of the year.- Throws:
IllegalArgumentException- ifmonthDayisnullIllegalArgumentException- ifstartMonthDayisnullIllegalArgumentException- ifendMonthDayisnull- Since:
- 1.0
-
next
public static MonthDay next(MonthDay monthDay)
Returns the month-day following the given month-day.- Throws:
IllegalArgumentException- ifmonthDayisnull- Since:
- 1.0
-
previous
public static MonthDay previous(MonthDay monthDay)
Returns the month-day preceding the given month-day.Always returns
MonthDay.of(FEBRUARY, 29)forMonthDay.of(MARCH, 1).- Throws:
IllegalArgumentException- ifmonthDayisnull- Since:
- 1.0
-
-