Package com.highdeal.calendar.hci
Class HolidayModel.EasterRelativeDay
java.lang.Object
com.highdeal.calendar.hci.HolidayModel.EasterRelativeDay
- All Implemented Interfaces:
HolidayModel.DayDefinition
- Enclosing class:
- HolidayModel
public static final class HolidayModel.EasterRelativeDay
extends 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
ConstructorsConstructorDescriptionEasterRelativeDay(int offset) Builds a newEasterRelativeDaywith the given offset. -
Method Summary
Modifier and TypeMethodDescriptionvoidExists as implementation ofHolidayModel.DayDefinition.checkValidity()but does nothing, since no error may exist in an Easter relative day configuration.intGets the offset.intgetType()Returns the type of the implementing class.voidsetOffset(int offset) Sets the offset.
-
Constructor Details
-
EasterRelativeDay
public EasterRelativeDay(int offset) Builds a newEasterRelativeDaywith the given offset.- Parameters:
offset- The offset relative to Easter Sunday
-
-
Method Details
-
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.DayDefinitionReturns the type of the implementing class. Internal use only.- Specified by:
getTypein interfaceHolidayModel.DayDefinition- Returns:
- The type of the implementing class
-
checkValidity
Exists as implementation ofHolidayModel.DayDefinition.checkValidity()but does nothing, since no error may exist in an Easter relative day configuration.- Specified by:
checkValidityin interfaceHolidayModel.DayDefinition- Throws:
InvalidHolidayException- See Also:
-