108 |
* @author Andrew John Hughes (gnu_andrew@member.fsf.org) |
* @author Andrew John Hughes (gnu_andrew@member.fsf.org) |
109 |
*/ |
*/ |
110 |
public class Date |
public class Date |
111 |
implements Cloneable, Comparable, Serializable |
implements Cloneable, Comparable<Date>, Serializable |
112 |
{ |
{ |
113 |
/** |
/** |
114 |
* This is the serialization UID for this class |
* This is the serialization UID for this class |
354 |
} |
} |
355 |
|
|
356 |
/** |
/** |
|
* Compares this Date to another object. This behaves like |
|
|
* <code>compareTo(Date)</code>, but it takes a generic object |
|
|
* and throws a <code>ClassCastException</code> if obj is |
|
|
* not a <code>Date</code>. |
|
|
* |
|
|
* @param obj the other date. |
|
|
* @return 0, if the date represented |
|
|
* by obj is exactly the same as the time represented by this |
|
|
* object, a negative if this Date is before the other Date, and |
|
|
* a positive value otherwise. |
|
|
* @exception ClassCastException if obj is not of type Date. |
|
|
*/ |
|
|
public int compareTo(Object obj) |
|
|
{ |
|
|
return compareTo((Date) obj); |
|
|
} |
|
|
|
|
|
/** |
|
357 |
* Computes the hash code of this <code>Date</code> as the |
* Computes the hash code of this <code>Date</code> as the |
358 |
* XOR of the most significant and the least significant |
* XOR of the most significant and the least significant |
359 |
* 32 bits of the 64 bit milliseconds value. |
* 32 bits of the 64 bit milliseconds value. |