public class Timestamp extends Object implements Cloneable, Serializable
Timestamp
class represents the time
at which an operation was performed.Constructor and Description |
---|
Timestamp()
constructor
|
Timestamp(Date d) |
Timestamp(long l)
Initializes
Timestamp with the specified number of seconds (not milli-seconds)
elapsed since standard base time("epoch time"). |
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Clone implementation that returns an Object with data cloned from self.
|
boolean |
equals(Object obj)
Use this method for checking equality between the current object and the
provided one.
|
long |
getValue()
Returns the number of seconds since January 1, 1970 (according to
UNIX® conventions).
|
int |
hashCode()
Returns the hash code value for this instance of the current class.
|
void |
setValue(Date d)
Sets the time from the given date.
|
void |
setValue(long l)
Sets the number of seconds for the time (in
long integer format). |
void |
setValue(Timestamp ts)
Sets the time to the time of the given timestamp.
|
Date |
toDate()
Returns the date in the
java.util.Date format. |
String |
toString()
Returns a string description of the object.
|
public Timestamp()
public Timestamp(long l)
Timestamp
with the specified number of seconds (not milli-seconds)
elapsed since standard base time("epoch time").l
- public Timestamp(Date d)
public void setValue(long l)
long
integer format).public void setValue(Timestamp ts)
public void setValue(Date d)
public long getValue()
public Date toDate()
java.util.Date
format.public String toString()
public boolean equals(Object obj)
public Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
public int hashCode()
? Copyright 2013 BMC Software, Inc.