public class Timestamp extends Date implements Cloneable, Comparable, Serializable
Constructor and Description |
---|
Timestamp(int year,
int month,
int date,
int hour,
int minute,
int second,
int nanos) |
Timestamp(long time) |
Modifier and Type | Method and Description |
---|---|
boolean |
after(Timestamp ts) |
boolean |
before(Timestamp ts) |
boolean |
equals(Object ts)
Compares the specified object to this
Date and returns if they are equal. |
boolean |
equals(Timestamp ts) |
int |
getNanos() |
void |
setNanos(int n) |
String |
toString()
Returns the string representation of this
Date in the format: Tue Jun 22
13:07:00 GMT 1999 |
static Timestamp |
valueOf(String s) |
after, before, clone, compareTo, compareTo, getDate, getDay, getHours, getMinutes, getMonth, getSeconds, getTime, getTimezoneOffset, getYear, hashCode, parse, setDate, setHours, setMinutes, setMonth, setSeconds, setTime, setYear, toGMTString, toLocaleString, UTC
finalize, getClass, notify, notifyAll, wait, wait, wait
compareTo
public Timestamp(int year, int month, int date, int hour, int minute, int second, int nanos)
public Timestamp(long time)
public boolean after(Timestamp ts)
public boolean before(Timestamp ts)
public boolean equals(Object ts)
Date
Date
and returns if they are equal.
To be equal, the object must be an instance of Date
and have the same millisecond
value.equals
in class Date
ts
- the object to compare with this object.true
if the specified object is equal to this Date
, false
otherwise.Date.hashCode()
public boolean equals(Timestamp ts)
public int getNanos()
public void setNanos(int n)
public String toString()
Date
Date
in the format: Tue Jun 22
13:07:00 GMT 1999