Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

javatools.util
Class FormattedDate  view FormattedDate download FormattedDate.java

java.lang.Object
  extended byjavatools.util.FormattedDate

public class FormattedDate
extends java.lang.Object

It's a java.util.Date, except in the fact it returns its "toString" value in a formatted way.

Version:
0.0.1

Field Summary
private  java.util.Date date
           
private  java.text.SimpleDateFormat formatter
           
 
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
 

Field Detail

date

private java.util.Date date

formatter

private java.text.SimpleDateFormat formatter
Constructor Detail

FormattedDate

public FormattedDate()
Creates new FormattedDateTemp


FormattedDate

public FormattedDate(long ldate)
Creates a new FormattedDate.


FormattedDate

public FormattedDate(java.util.Date ddate)
Creates a new FormattedDate.

Method Detail

getDate

public java.util.Date getDate()
Returns a normal Date representing the same date.


after

public boolean after(java.util.Date date)
Checks if a given date is after this date.


before

public boolean before(java.util.Date date)
Checks if a given date is after this date.


clone

public java.lang.Object clone()
Clones this object.


compareTo

public int compareTo(java.lang.Object obj)
Compares this object to another.


compareTo

public int compareTo(java.util.Date date)
Compares this date to a given date.


equals

public boolean equals(java.lang.Object obj)
Checks if an object equals this date.


getTime

public long getTime()
Returns the time of this date in millis.


hashCode

public int hashCode()
Returns a hash code for this object.


setTime

public void setTime(long param)
Sets the time in millis.


toString

public java.lang.String toString()
Returns the date in a formatted way.


setFormatter

public void setFormatter(java.text.SimpleDateFormat pFormatter)
Sets the formatter.


getFormatter

public java.text.SimpleDateFormat getFormatter()
Returns the current formatter to use.