SAP CC 1.0
API 4.2 (Core)

com.highdeal.calendar.hci
Class HolidayModel.RelativeDay

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

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

This 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
HolidayModel.RelativeDay(java.lang.String month, java.lang.String weekday, java.lang.String position)
          Build a new RelativeDay.
 
Method Summary
 void checkValidity()
          Throws an InvalidHolidayException if: month is not one of month defined in MONTHS. weekday is not one of weekday defined in WEEKDAYS. position is not one of position defined in POSITIONS.
 java.lang.String getMonth()
          Gets the month.
 java.lang.String getPosition()
          Gets the position.
 int getType()
          Returns the type of the implementing class.
 java.lang.String getWeekday()
          Get the weekday.
 void setMonth(java.lang.String month)
          Sets the month.
 void setPosition(java.lang.String position)
          Sets the position.
 void setWeekday(java.lang.String weekday)
          Sets the weekday.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HolidayModel.RelativeDay

public HolidayModel.RelativeDay(java.lang.String month,
                                java.lang.String weekday,
                                java.lang.String position)
Build a new RelativeDay.

Parameters:
month - the month name, see MONTHS
weekday - the weekday name, see WEEKDAYS
position - the position of the weekday in the month, see POSITIONS
Method Detail

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.

getPosition

public java.lang.String getPosition()
Gets the position.

Returns:
the position.

setPosition

public void setPosition(java.lang.String position)
Sets the position. Should be one of position names defined in POSITIONS.

Parameters:
position - the position.

getWeekday

public java.lang.String getWeekday()
Get the weekday.

Returns:
set the weekday.

setWeekday

public void setWeekday(java.lang.String weekday)
Sets the weekday. Should be one of weekday names defined in WEEKDAYS.

Parameters:
weekday - the weekday.

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:
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:
HolidayModel.FixedDay.checkValidity(), checkValidity(), HolidayModel.EasterRelativeDay.checkValidity(), HolidayModel.EnumeratedDay.checkValidity()

SAP CC 1.0
API 4.2 (Core)


API Reference - July 2009

SAP Convergent Charging 1.0 (build R4.2.1.35.0.0)
CONVERGENT CHARGING 4.2

(c) Copyright 2009 SAP AG. All rights reserved.