Modifier and Type | Field and Description |
---|---|
protected java.math.BigDecimal |
_timestamp
the timestamp information
|
Constructor and Description |
---|
Timestamp(java.math.BigDecimal timestamp)
Primary constructor from the full precision seconds since the Java epoch.
|
Timestamp(java.sql.Timestamp timestamp)
Construct a Timestamp from a java.sql.Timestamp
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Timestamp otherTimestamp)
Compare this timestamp with another timestamp.
|
boolean |
equals(java.lang.Object timestamp)
Determine if the specified timestamp equals this one.
|
java.util.Date |
getDate()
Get the times tamp as a Java Date.
|
java.math.BigDecimal |
getFullSeconds()
Get the time in seconds with full precision since the Java epoch.
|
double |
getSeconds()
Get the time in seconds since the Java epoch.
|
java.sql.Timestamp |
getSQLTimestamp()
Get the SQL Timestamp equivalent of this instance.
|
long |
getTime()
Get the timestamp in milliseconds relative to the Java epoch.
|
int |
hashCode()
Override the hashcode as required when overriding equals.
|
java.lang.String |
toString()
Get a string representation of the Timestamp.
|
java.lang.String |
toString(java.text.DateFormat timeFormat)
Generate a string representation of this timestamp using the specified time format for the time format up to seconds.
|
public Timestamp(java.math.BigDecimal timestamp)
timestamp
- the number of seconds since the Java epochpublic Timestamp(java.sql.Timestamp timestamp)
timestamp
- an SQL timestamppublic java.util.Date getDate()
public long getTime()
public double getSeconds()
public java.math.BigDecimal getFullSeconds()
public java.sql.Timestamp getSQLTimestamp()
public java.lang.String toString(java.text.DateFormat timeFormat)
timeFormat
- format for which to generate the stringpublic java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object timestamp)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public int compareTo(Timestamp otherTimestamp)
compareTo
in interface java.lang.Comparable<Timestamp>
otherTimestamp
- The timestamp with which to compare this one