Package com.highdeal.calendar.hci
Class HolidayModel.FixedDay
java.lang.Object
com.highdeal.calendar.hci.HolidayModel.FixedDay
- All Implemented Interfaces:
HolidayModel.DayDefinition
- Enclosing class:
- HolidayModel
public static final class HolidayModel.FixedDay
extends Object
implements HolidayModel.DayDefinition
This
Java class enables to define a fixed day, that is to say a day given
by a fixed date, same date each year (such as New Year Day, for instance).-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
FixedDay
Builds a newFixedDay- Parameters:
month- The month name, seeMONTHSday- The day in month
-
-
Method Details
-
getDay
public int getDay()Gets the day.- Returns:
- The day
-
setDay
public void setDay(int day) Sets the day.- Parameters:
day- The day
-
getMonth
Gets the month.- Returns:
- The month
-
setMonth
Sets the month. Should be one of month names defined inMONTHS.- Parameters:
month- The month
-
getType
public int getType()Description copied from interface:HolidayModel.DayDefinitionReturns the type of the implementing class. Internal use only.- Specified by:
getTypein interfaceHolidayModel.DayDefinition- Returns:
- The type of the implementing class
-
checkValidity
Throws anInvalidHolidayExceptionif:- month is not one of month defined in
MONTHS. - day is not possible for the given month (i.e. day <e; 0 or day > month's length).
- month is not one of month defined in
-