|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javatools.util.FormattedDate
It's a java.util.Date, except in the fact it returns its "toString" value in a formatted way.
Constructor Summary | |
FormattedDate()
Creates new FormattedDateTemp |
|
FormattedDate(java.util.Date ddate)
Creates a new FormattedDate. |
|
FormattedDate(long ldate)
Creates a new FormattedDate. |
Method Summary | |
boolean |
after(java.util.Date date)
Checks if a given date is after this date. |
boolean |
before(java.util.Date date)
Checks if a given date is after this date. |
java.lang.Object |
clone()
Clones this object. |
int |
compareTo(java.util.Date date)
Compares this date to a given date. |
int |
compareTo(java.lang.Object obj)
Compares this object to another. |
boolean |
equals(java.lang.Object obj)
Checks if an object equals this date. |
java.util.Date |
getDate()
Returns a normal Date representing the same date. |
java.text.SimpleDateFormat |
getFormatter()
Returns the current formatter to use. |
long |
getTime()
Returns the time of this date in millis. |
int |
hashCode()
Returns a hash code for this object. |
void |
setFormatter(java.text.SimpleDateFormat pFormatter)
Sets the formatter. |
void |
setTime(long param)
Sets the time in millis. |
java.lang.String |
toString()
Returns the date in a formatted way. |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public FormattedDate()
public FormattedDate(long ldate)
ldate
- The value in millis of the date.public FormattedDate(java.util.Date ddate)
ddate
- The base date to refer to.Method Detail |
public java.util.Date getDate()
public boolean after(java.util.Date date)
date
- The date to check.
true
: the passed date is after this date;
false
: otherwise.public boolean before(java.util.Date date)
date
- The date to check.
true
: the passed date is after this date;
false
: otherwise.public java.lang.Object clone()
clone
in class java.lang.Object
public int compareTo(java.lang.Object obj)
obj
- The object to check.
public int compareTo(java.util.Date date)
date
- The date to check.
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- The object to check.
true
: the objects are equal;
false
: the objects are NOT equal;public long getTime()
public int hashCode()
hashCode
in class java.lang.Object
public void setTime(long param)
param
- The time in millis.public java.lang.String toString()
toString
in class java.lang.Object
public void setFormatter(java.text.SimpleDateFormat pFormatter)
pFormatter
- The date formatter to use.public java.text.SimpleDateFormat getFormatter()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |