|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.plumtree.openfoundation.util.XPDateTime
public class XPDateTime
Represents an instant in time, typically expressed as a date and time of day.
Field Summary | |
---|---|
protected java.util.Date |
dt
Internal Date. |
Constructor Summary | |
---|---|
XPDateTime()
Allocates a XPDateTime object and initializes it so that it represents the time at which it was allocated, measured to the nearest millisecond. |
|
XPDateTime(java.util.Date date)
Allocates a XPDateTime object using the given date value. |
|
XPDateTime(long millisecondsSinceEpoch)
Allocates a Date object and initializes it to represent the specified number of milliseconds since the standard base time known as "the epoch", namely January 1, 1970, 00:00:00 GMT. |
Method Summary | |
---|---|
boolean |
After(XPDateTime when)
Tests if this date is after the given date. |
boolean |
Before(XPDateTime when)
Tests if this date is before the given date. |
int |
compareTo(java.lang.Object obj)
Compare two XPDateTime objects; Return 0 if the argument Date is equal to this Date, a value less than 0 if this Date is before the Date argument, and a value greater than 0 if this Date is after the Date argument. |
int |
CompareTo(java.lang.Object obj)
Compares this object with Object passed to it and returns a value indicating whether one is less than, equal to or greater than the other. |
int |
CompareTo(XPDateTime date)
Compare two XPDateTime objects; Return 0 if the argument Date is equal to this Date, a value less than 0 if this Date is before the Date argument, and a value greater than 0 if this Date is after the Date argument. |
boolean |
equals(java.lang.Object obj)
false if this Date does not have the same value as the Date argument. |
boolean |
Equals(XPDateTime date)
false if this Date does not have the same value as the Date argument. |
long |
GetTimeInMilliSeconds()
Returns the number of milliseconds since January 1, 1970, 00:00:00 GMT represented by this Date object. |
java.util.Date |
GetUnderlyingObject()
Returns the platform specific object that this class wraps. |
int |
hashCode()
Returns the hash code value for this map. |
boolean |
IsNear(XPDateTime timeToCompare,
int withinNumSeconds)
Determine if this instance date are close to the argument date given a time interval. |
java.lang.String |
toString()
Returns the string representation of this object in date/time LONG format based on the runtime locale. |
java.lang.String |
ToString()
Returns the string representation of this object in date/time LONG format based on the runtime locale. |
java.lang.String |
ToString(XPLocale locale)
Converts the value of this object into it's string representation. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.util.Date dt
Constructor Detail |
---|
public XPDateTime()
public XPDateTime(long millisecondsSinceEpoch)
millisecondsSinceEpoch
- since January 1, 1970, 00:00:00 GMT.public XPDateTime(java.util.Date date)
date
- Java DateMethod Detail |
---|
public boolean After(XPDateTime when)
when
- Date to be tested.
public boolean Before(XPDateTime when)
when
- Date to be tested.
public long GetTimeInMilliSeconds()
public java.util.Date GetUnderlyingObject()
public java.lang.String ToString(XPLocale locale)
locale
- the locale format to use
public java.lang.String ToString()
XPLocale.GetDefault()
).public java.lang.String toString()
toString
in class java.lang.Object
XPLocale.GetDefault()
).public int CompareTo(java.lang.Object obj)
IXPComparable
CompareTo
in interface IXPComparable
obj
- object to compare
IXPComparable.CompareTo(Object)
public int CompareTo(XPDateTime date)
date
- to compare with
IXPComparable.CompareTo(Object)
public int compareTo(java.lang.Object obj)
compareTo
in interface java.lang.Comparable
obj
- to compare with
Comparable.compareTo(Object)
public boolean IsNear(XPDateTime timeToCompare, int withinNumSeconds)
timeToCompare
- date to compare withwithinNumSeconds
- time interval in second
XPIllegalArgumentException
- if num of second is negative, or the XPDateTime
object is nullpublic boolean Equals(XPDateTime date)
date
- to test equals with
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- to test equals with
public int hashCode()
hashCode
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |