com.highdeal.calendar.hci
Class HolidayModel.FixedDay

java.lang.Object
  extended by com.highdeal.calendar.hci.HolidayModel.FixedDay
All Implemented Interfaces:
HolidayModel.DayDefinition
Enclosing class:
HolidayModel

public static final class HolidayModel.FixedDay
extends java.lang.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
HolidayModel.FixedDay(java.lang.String month, int day)
          Builds a new FixedDay
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HolidayModel.FixedDay

public HolidayModel.FixedDay(java.lang.String month,
                             int day)
Builds a new FixedDay

Parameters:
month - The month name, see MONTHS
day - The day in month
Method Detail

getDay

public int getDay()
Gets the day.

Returns:
The day

setDay

public void setDay(int day)
Sets the day.

Parameters:
day - The day

getMonth

public java.lang.String getMonth()
Gets the month.

Returns:
The month

setMonth

public void setMonth(java.lang.String month)
Sets the month. Should be one of month names defined in MONTHS.

Parameters:
month - The month

getType

public int getType()
Description copied from interface: HolidayModel.DayDefinition
Returns the type of the implementing class. Internal use only.

Specified by:
getType in interface HolidayModel.DayDefinition
Returns:
The type of the implementing class

checkValidity

public void checkValidity()
                   throws InvalidHolidayException
Throws an InvalidHolidayException if:

Specified by:
checkValidity in interface HolidayModel.DayDefinition
Throws:
InvalidHolidayException
See Also:
checkValidity(), HolidayModel.RelativeDay.checkValidity(), HolidayModel.EasterRelativeDay.checkValidity(), HolidayModel.EnumeratedDay.checkValidity()

Document Published: October 2015 (SAP CC 4.0 SP10 and Later)