AR System Java API

com.bmc.arsys.api
Class Timestamp

java.lang.Object
  extended by com.bmc.arsys.api.Timestamp
All Implemented Interfaces:
Serializable, Cloneable

public class Timestamp
extends Object
implements Cloneable, Serializable

The Timestamp class represents the time at which an operation was performed.

See Also:
Serialized Form

Constructor Summary
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").
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Timestamp

public Timestamp()
constructor


Timestamp

public Timestamp(long l)
Initializes Timestamp with the specified number of seconds (not milli-seconds) elapsed since standard base time("epoch time").

Parameters:
l -

Timestamp

public Timestamp(Date d)
Method Detail

setValue

public void setValue(long l)
Sets the number of seconds for the time (in long integer format).


setValue

public void setValue(Timestamp ts)
Sets the time to the time of the given timestamp.


setValue

public void setValue(Date d)
Sets the time from the given date.


getValue

public long getValue()
Returns the number of seconds since January 1, 1970 (according to UNIX® conventions).


toDate

public Date toDate()
Returns the date in the java.util.Date format.


toString

public String toString()
Returns a string description of the object.

Overrides:
toString in class Object

equals

public boolean equals(Object obj)
Use this method for checking equality between the current object and the provided one. The result is true only if the argument is not null, is of the same type and represents the same content.

Overrides:
equals in class Object
Parameters:
obj - the object that we are comparing to
Returns:
returns a boolean that tells if the two objects equal

clone

public Object clone()
             throws CloneNotSupportedException
Clone implementation that returns an Object with data cloned from self.

Overrides:
clone in class Object
Throws:
CloneNotSupportedException

hashCode

public int hashCode()
Returns the hash code value for this instance of the current class. This method is supported as required by the general contract of Object.hashCode, for the benefit of hash tables such as those provided by java.util.Hashtable.

Overrides:
hashCode in class Object
Returns:
returns the hash code for this instance

AR System Java API

© Copyright 2006, 2007 BMC Software, Inc.