com.numericalmethod.suanshu.time
Class ComparableDateTime
java.lang.Object
com.numericalmethod.suanshu.time.ComparableDateTime
- All Implemented Interfaces:
- java.lang.Comparable<ComparableDateTime>
public class ComparableDateTime
- extends java.lang.Object
- implements java.lang.Comparable<ComparableDateTime>
A wrapper around DateTime that implements the method public int compareTo(T o);.
|
Constructor Summary |
ComparableDateTime(org.joda.time.DateTime time)
Construct an instance from DateTime. |
ComparableDateTime(int year,
int monthOfYear,
int dayOfMonth,
int hourOfDay,
int minuteOfHour,
int secondOfMinute,
int millisOfSecond,
org.joda.time.DateTimeZone zone)
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
ComparableDateTime
public ComparableDateTime(org.joda.time.DateTime time)
- Construct an instance from DateTime.
- Parameters:
time - a DateTime
ComparableDateTime
public ComparableDateTime(int year,
int monthOfYear,
int dayOfMonth,
int hourOfDay,
int minuteOfHour,
int secondOfMinute,
int millisOfSecond,
org.joda.time.DateTimeZone zone)
compareTo
public int compareTo(ComparableDateTime that)
- Specified by:
compareTo in interface java.lang.Comparable<ComparableDateTime>
asDateTime
public org.joda.time.DateTime asDateTime()
- Cast the instance to DateTime.
- Returns:
- the representation in DateTime
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
Copyright © 2011 Numerical Method Inc. Ltd. All Rights Reserved.