public static final class HolidayModel.FixedDay extends java.lang.Object implements HolidayModel.DayDefinition
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 and Description |
|---|
FixedDay(java.lang.String month,
int day)
Builds a new
FixedDay |
| Modifier and Type | Method and Description |
|---|---|
void |
checkValidity()
Throws an
InvalidHolidayException if:
month is not one of month defined in MONTHS. |
int |
getDay()
Gets the day.
|
java.lang.String |
getMonth()
Gets the month.
|
int |
getType()
Returns the type of the implementing class.
|
void |
setDay(int day)
Sets the day.
|
void |
setMonth(java.lang.String month)
Sets the month.
|
public FixedDay(java.lang.String month,
int day)
FixedDaymonth - The month name, see MONTHSday - The day in monthpublic int getDay()
public void setDay(int day)
day - The daypublic java.lang.String getMonth()
public void setMonth(java.lang.String month)
MONTHS.month - The monthpublic int getType()
HolidayModel.DayDefinitiongetType in interface HolidayModel.DayDefinitionpublic void checkValidity()
throws InvalidHolidayException
InvalidHolidayException if:
MONTHS.
checkValidity in interface HolidayModel.DayDefinitionInvalidHolidayExceptioncheckValidity(),
HolidayModel.RelativeDay.checkValidity(),
HolidayModel.EasterRelativeDay.checkValidity(),
HolidayModel.EnumeratedDay.checkValidity()