class BigDate implements java.lang.Comparable
{
int ordinal;
... other fields ...
/**
* Defines Natural Order for the BigDate class.
* Determines if this date comes after some other date.
* Conceptually returns (this - anotherBigDate).
* compareTo() == 0 is faster than equals().
* @param anotherBigDate date to compare against
* @return a positive number if this date > (after) anotherBigDate.
* zero if this date = anotherBigDate.
* a negative number if this date < (before) anotherBigDate.
*/
public final int compareTo( Object anotherBigDate )
{
return this.ordinal - ( (BigDate)anotherBigDate).ordinal;
}
}