Class HolidayModel.RelativeDay
java.lang.Object
com.highdeal.calendar.hci.HolidayModel.RelativeDay
- All Implemented Interfaces:
HolidayModel.DayDefinition
- Enclosing class:
HolidayModel
public static final class HolidayModel.RelativeDay
extends Object
implements HolidayModel.DayDefinition
This
Java class enables to define a relative day, that is to say a day given
by a week day position in a month (e.g. second monday of January).-
Constructor Summary
ConstructorsConstructorDescriptionRelativeDay(String month, String weekday, String position) Builds a newRelativeDay. -
Method Summary
Modifier and TypeMethodDescriptionvoidgetMonth()Gets the month.Gets the position.intgetType()Returns the type of the implementing class.Gets the weekday.voidSets the month; Should be one of month names defined inMONTHS.voidsetPosition(String position) Sets the position; Should be one of position names defined inPOSITIONS.voidsetWeekday(String weekday) Sets the weekday; Should be one of weekday names defined inWEEKDAYS.
-
Constructor Details
-
RelativeDay
-
-
Method Details
-
getMonth
-
setMonth
-
getPosition
-
setPosition
-
getWeekday
-
setWeekday
-
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:- Specified by:
checkValidityin interfaceHolidayModel.DayDefinition- Throws:
InvalidHolidayException- See Also:
-