com.jrefinery.date
Class AnnualDateRule

java.lang.Object
  extended by com.jrefinery.date.AnnualDateRule
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
DayAndMonthRule, DayOfWeekInMonthRule, EasterSundayRule, RelativeDayOfWeekRule

public abstract class AnnualDateRule
extends java.lang.Object
implements java.lang.Cloneable

The base class for all 'annual' date rules: that is, rules for generating one date for any given year.

One example is Easter Sunday (which can be calculated using published algorithms).


Constructor Summary
AnnualDateRule()
           
 
Method Summary
 java.lang.Object clone()
          Returns a clone of the rule.
abstract  SerialDate getDate(int year)
          Returns the date for this rule, given the year.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnualDateRule

public AnnualDateRule()
Method Detail

getDate

public abstract SerialDate getDate(int year)
Returns the date for this rule, given the year.

Parameters:
yyyy - The year (1900 <= year <= 9999).
Returns:
The date for this rule, given the year.

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Returns a clone of the rule.

You should refer to the documentation of the clone() method in each subclass for exact details.

Overrides:
clone in class java.lang.Object
Returns:
A clone of the rule.
Throws:
java.lang.CloneNotSupportedException


Copyright © 2003 MBARI.

The Monterey Bay Aquarium Research Institute (MBARI) provides this documentation and code "as is", with no warranty, express or implied, of its quality or consistency. It is provided without support and without obligation on the part of MBARI to assist in its use, correction, modification, or enhancement.