Package com.highdeal.calendar.hci
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
-
Method Details
-
getMonth
Gets the month.- Returns:
- The month
-
setMonth
Sets the month; Should be one of month names defined inMONTHS.- Parameters:
month- The month
-
getPosition
Gets the position.- Returns:
- The position
-
setPosition
Sets the position; Should be one of position names defined inPOSITIONS.- Parameters:
position- The position
-
getWeekday
Gets the weekday.- Returns:
- Set the weekday
-
setWeekday
Sets the weekday; Should be one of weekday names defined inWEEKDAYS.- Parameters:
weekday- The weekday
-
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:
-