public static class Debug.Timestamp extends Object implements Serializable, RevisionHandler
SimpleDateFormat
,
Serialized FormModifier and Type | Field and Description |
---|---|
static String |
DEFAULT_FORMAT
the default format
|
Constructor and Description |
---|
Timestamp()
creates a timestamp with the current date and time and the default
format.
|
Timestamp(Date stamp)
creates a timestamp with the given date and the default format.
|
Timestamp(Date stamp,
String format)
creates a timestamp with the given date and format.
|
Timestamp(String format)
creates a timestamp with the current date and time and the specified
format.
|
Modifier and Type | Method and Description |
---|---|
String |
getFormat()
returns the current timestamp format
|
String |
getRevision()
Returns the revision string.
|
Date |
getStamp()
returns the associated date/time
|
void |
setFormat(String value)
sets the format for the timestamp
|
String |
toString()
returns the timestamp as string in the specified format
|
public static final String DEFAULT_FORMAT
public Timestamp()
public Timestamp(String format)
format
- the format of the timestampSimpleDateFormat
public Timestamp(Date stamp)
stamp
- the associated date/time for the timestamppublic Timestamp(Date stamp, String format)
stamp
- the associated date/time for the timestampformat
- the format of the timestampSimpleDateFormat
public void setFormat(String value)
value
- the format stringSimpleDateFormat
public String getFormat()
public Date getStamp()
public String toString()
public String getRevision()
getRevision
in interface RevisionHandler
Copyright © 2019 University of Waikato, Hamilton, NZ. All rights reserved.