com.highdeal.calendar.hci
Class HolidayModel.EasterRelativeDay

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

public static final class HolidayModel.EasterRelativeDay
extends java.lang.Object
implements HolidayModel.DayDefinition

This Java class enables to define day which is relative to Easter Sunday. An Easter relative day is defined by an offset which is the number of days after Easter Sunday, in case of positive offset, or the number of days before EasterSenday, in case of negative offset. For instance: Good Friday is defined by a -2 offset, Easter Monday is defined by a 1 offset, and Easter Sunday is defined by a 0 offset.


Constructor Summary
HolidayModel.EasterRelativeDay(int offset)
          Builds a new EasterRelativeDay with the given offset.
 
Method Summary
 void checkValidity()
          Exists as implementation of HolidayModel.DayDefinition.checkValidity() but does nothing, since no error may exist in an Easter relative day configuration.
 int getOffset()
          Gets the offset.
 int getType()
          Returns the type of the implementing class.
 void setOffset(int offset)
          Sets the offset.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HolidayModel.EasterRelativeDay

public HolidayModel.EasterRelativeDay(int offset)
Builds a new EasterRelativeDay with the given offset.

Parameters:
offset - The offset relative to Easter Sunday
Method Detail

getOffset

public int getOffset()
Gets the offset.

Returns:
The offset

setOffset

public void setOffset(int offset)
Sets the offset.

Parameters:
offset - The offset

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
Exists as implementation of HolidayModel.DayDefinition.checkValidity() but does nothing, since no error may exist in an Easter relative day configuration.

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

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