|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectproper.util.Timestamp
public class Timestamp
This is a simple class for creating timestamps. They can be with or w/o
hostname or for a specific time. The separator is always a blank (it is
also added at the end of the timestamp).
The format is this:
Constructor Summary | |
---|---|
Timestamp()
initializes the timestamp with the current time and NO host |
|
Timestamp(java.util.Date timestamp)
initializes the timestamp with the given time/date and NO host |
|
Timestamp(java.util.Date timestamp,
java.lang.String host)
initializes the timestamp with the given host and time/date |
|
Timestamp(java.lang.String host)
initializes the timestamp with the given host and the current time/date |
Method Summary | |
---|---|
java.lang.String |
getHost()
returns the current set host |
java.util.Date |
getTimestamp()
returns the current set time/date |
java.lang.String |
toString()
returns the timestamp in a string representation |
static Timestamp |
valueOf()
creates a timestamp with current time and NO host |
static Timestamp |
valueOf(java.util.Date timestamp)
creates a timestamp with the given time and NO host |
static Timestamp |
valueOf(java.util.Date timestamp,
java.lang.String host)
creates a timestamp with the given time and host |
static Timestamp |
valueOf(java.lang.String host)
creates a timestamp with current time and the given host |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Timestamp()
public Timestamp(java.util.Date timestamp)
public Timestamp(java.lang.String host)
public Timestamp(java.util.Date timestamp, java.lang.String host)
Method Detail |
---|
public java.util.Date getTimestamp()
public java.lang.String getHost()
public static Timestamp valueOf()
public static Timestamp valueOf(java.util.Date timestamp)
public static Timestamp valueOf(java.lang.String host)
public static Timestamp valueOf(java.util.Date timestamp, java.lang.String host)
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |