com.sforce.ws.types
Class Time

java.lang.Object
  extended by com.sforce.ws.types.Time
All Implemented Interfaces:
Serializable

public class Time
extends Object
implements Serializable

Class that represents the xsd:time XML Schema type Taken from Apache Axis 1.4. Modified slightly by btsai.

See Also:
Serialized Form

Constructor Summary
Time(Calendar value)
          Initialize with a Calender, year month and date are ignored
Time(long value)
          Initializes with a Calendar instance in GMT based on the number of milliseconds since midnight.
Time(String value)
          Converts a string formatted as HH:mm:ss[.SSS][+/-offset]
 
Method Summary
 boolean equals(Object obj)
           
 long getTimeInMillis()
          Returns the time in milliseconds since midnight in UTC.
 int hashCode()
          Returns the hashcode of the underlying calendar.
 String toString()
          stringify method returns the time as it would be in GMT, only accurate to the second...millis probably get lost.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Time

public Time(Calendar value)
Initialize with a Calender, year month and date are ignored

Parameters:
value - initial value

Time

public Time(String value)
     throws NumberFormatException
Converts a string formatted as HH:mm:ss[.SSS][+/-offset]

Parameters:
value - value
Throws:
NumberFormatException - failed to parse value

Time

public Time(long value)
Initializes with a Calendar instance in GMT based on the number of milliseconds since midnight. Year, month, and date are ignored.

Parameters:
value - value
Method Detail

getTimeInMillis

public long getTimeInMillis()
Returns the time in milliseconds since midnight in UTC.

Returns:
time in milli sec

toString

public String toString()
stringify method returns the time as it would be in GMT, only accurate to the second...millis probably get lost.

Overrides:
toString in class Object
Returns:
string

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Returns the hashcode of the underlying calendar.

Overrides:
hashCode in class Object
Returns:
an int value


Copyright © 2012. All Rights Reserved.