com.lightdev.lib.holiday.client
Class YearEvent

java.lang.Object
  extended by com.lightdev.lib.holiday.client.YearEvent
All Implemented Interfaces:
Serializable, Comparable

public class YearEvent
extends Object
implements Comparable, Serializable

Class to transport arbitrary event objects from the Light Development World Holiday Calendar Service

Version:
1, 7.5.2006
Author:
Ulrich Hilger, Light Development, http://www.lightdev.com, info@lightdev.com, published under the terms and conditions of the BSD License, for details see file license.txt in the distribution package of this software
See Also:
Serialized Form

Constructor Summary
YearEvent(Integer id, String name, GregorianCalendar[] dates)
          create a new instance of a YearEvent object
 
Method Summary
 int compareTo(Object o)
          compare this object to another object
 GregorianCalendar[] getDates()
          get the dates this event occurs on
 Object getId()
          get the id of this event under which it is uniquely identified at the Light Development World Holiday Calendar Service
 String toString()
          get the name of this event
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

YearEvent

public YearEvent(Integer id,
                 String name,
                 GregorianCalendar[] dates)
create a new instance of a YearEvent object

Parameters:
id - event id
name - event name
dates - dates on which this event occurs
Method Detail

getDates

public GregorianCalendar[] getDates()
get the dates this event occurs on

Returns:
an array of occurrence dates

toString

public String toString()
get the name of this event

Overrides:
toString in class Object

getId

public Object getId()
get the id of this event under which it is uniquely identified at the Light Development World Holiday Calendar Service

Returns:
the event id, an Integer object

compareTo

public int compareTo(Object o)
compare this object to another object

Specified by:
compareTo in interface Comparable
Parameters:
o - the object to compare this object to
Returns:
a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.