public static final class HolidayModel.EasterRelativeDay extends java.lang.Object implements HolidayModel.DayDefinition
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 and Description |
|---|
EasterRelativeDay(int offset)
Builds a new
EasterRelativeDay with the given offset. |
| Modifier and Type | Method and Description |
|---|---|
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.
|
public EasterRelativeDay(int offset)
EasterRelativeDay with the given offset.offset - The offset relative to Easter Sundaypublic int getOffset()
public void setOffset(int offset)
offset - The offsetpublic int getType()
HolidayModel.DayDefinitiongetType in interface HolidayModel.DayDefinitionpublic void checkValidity()
throws InvalidHolidayException
HolidayModel.DayDefinition.checkValidity()
but does nothing, since no error may exist in an Easter relative day
configuration.checkValidity in interface HolidayModel.DayDefinitionInvalidHolidayExceptionHolidayModel.FixedDay.checkValidity(),
HolidayModel.RelativeDay.checkValidity(),
checkValidity(),
HolidayModel.EnumeratedDay.checkValidity()