us.souther.select
Class Holiday
java.lang.Object
us.souther.select.Holiday
- All Implemented Interfaces:
- java.lang.Comparable
class Holiday
- extends java.lang.Object
- implements java.lang.Comparable
Constructor Summary |
Holiday(int month,
int day,
java.lang.String name)
|
Method Summary |
int |
compareTo(java.lang.Object holiday)
required for interface Comparable. |
int |
getDay()
|
java.lang.String |
getKey()
An easy way to represent a holiday with a short string. |
int |
getMonth()
|
java.lang.String |
getName()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JANUARY
public static final int JANUARY
- See Also:
- Constant Field Values
FEBRUARY
public static final int FEBRUARY
- See Also:
- Constant Field Values
MARCH
public static final int MARCH
- See Also:
- Constant Field Values
APRIL
public static final int APRIL
- See Also:
- Constant Field Values
MAY
public static final int MAY
- See Also:
- Constant Field Values
JUNE
public static final int JUNE
- See Also:
- Constant Field Values
JULY
public static final int JULY
- See Also:
- Constant Field Values
AUGUST
public static final int AUGUST
- See Also:
- Constant Field Values
SEPTEMBER
public static final int SEPTEMBER
- See Also:
- Constant Field Values
OCTOBER
public static final int OCTOBER
- See Also:
- Constant Field Values
NOVEMBER
public static final int NOVEMBER
- See Also:
- Constant Field Values
DECEMBER
public static final int DECEMBER
- See Also:
- Constant Field Values
Holiday
public Holiday(int month,
int day,
java.lang.String name)
getName
public java.lang.String getName()
- Returns:
- The Holiday's name
getDay
public int getDay()
- Returns:
- The day of the month for this holiday.
getMonth
public int getMonth()
- Returns:
- The numeric represention for the month that
this holiday is celebrated.
getKey
public java.lang.String getKey()
- An easy way to represent a holiday with a short string.
This of course would would present a problem in a
real world app because it makes no provisions for
more than one holiday landing on the same day.
Again, this demonstration is about dynamic select lists
not about ORMapping.
- Returns:
- numeric month + '-' + numeric day.
compareTo
public int compareTo(java.lang.Object holiday)
- required for interface Comparable.
- Specified by:
compareTo
in interface java.lang.Comparable