com.ibm.calendar
Class Holiday

java.lang.Object
  extended by com.ibm.calendar.Holiday
All Implemented Interfaces:
java.io.Serializable

public class Holiday
extends java.lang.Object
implements java.io.Serializable

Holiday class holds 4 numbers, representing a holiday. Holiday can be

Each holiday can be set as Holiday can be set or get as a coded string described at setHoliday of the Calendar bean.

See Also:
Calendar, Serialized Form

Field Summary
 java.lang.String[] monthnames
          Holds names of the months.
 
Constructor Summary
Holiday()
          Holiday constructor.
Holiday(java.lang.String s)
          Holiday constructor.
 
Method Summary
 boolean equals(java.util.Calendar cal)
          Checks whether the parameter suites the holiday holded by the instance.
 int getDay()
          Returns the day number.
 int getMonth()
          Returns the number of the month.
 java.lang.String getText()
          Returns a string describing the holiday in long form.
 int getWeek()
          Returns the number of the week.
 int getYear()
          Returns the year.
 void initialize()
          Creates and initializes needed arrays.
 void parse(java.lang.String s)
          Parses a coded string and sets the fields of the object.
 void setDay(int d)
          Sets day number.
 void setMonth(int m)
          Sets number of month.
 void setWeek(int w)
          Sets number of week.
 void setYear(int y)
          Sets year field.
 java.lang.String toString()
          Returns the coded string form of the held holiday.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

monthnames

public java.lang.String[] monthnames
Holds names of the months.

Constructor Detail

Holiday

public Holiday()
Holiday constructor.


Holiday

public Holiday(java.lang.String s)
Holiday constructor. Parameter is a coded string, representing a holiday. The object holds this holiday.

Parameters:
s - java.lang.String
Method Detail

equals

public boolean equals(java.util.Calendar cal)
Checks whether the parameter suites the holiday holded by the instance.

Parameters:
cal - java.util.Calendar
Returns:
boolean

getDay

public int getDay()
Returns the day number.

Returns:
int

getMonth

public int getMonth()
Returns the number of the month.

Returns:
int

getText

public java.lang.String getText()
Returns a string describing the holiday in long form.

Returns:
java.lang.String

getWeek

public int getWeek()
Returns the number of the week.

Returns:
int

getYear

public int getYear()
Returns the year.

Returns:
int

initialize

public void initialize()
Creates and initializes needed arrays.


parse

public void parse(java.lang.String s)
Parses a coded string and sets the fields of the object.

Parameters:
s - java.lang.String

setDay

public void setDay(int d)
Sets day number.

Parameters:
d - int

setMonth

public void setMonth(int m)
Sets number of month.

Parameters:
m - int

setWeek

public void setWeek(int w)
Sets number of week.

Parameters:
w - int

setYear

public void setYear(int y)
Sets year field.

Parameters:
y - int

toString

public java.lang.String toString()
Returns the coded string form of the held holiday.

Overrides:
toString in class java.lang.Object
Returns:
java.lang.String