public class

Time

extends Object
implements Serializable
java.lang.Object
   ↳ com.sforce.ws.types.Time

Class Overview

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

Summary

Constants
long serialVersionUID
Fields
private Calendar _value
private static final SimpleDateFormat zulu a shared java.text.SimpleDateFormat instance used for parsing the basic component of the timestamp
Public Constructors
Time(Calendar value)
Initialize with a Calender, year month and date are ignored
Time(String value)
Converts a string formatted as HH:mm:ss[.SSS][+/-offset]
Time(long value)
Initializes with a Calendar instance in GMT based on the number of milliseconds since midnight.
Public Methods
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.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

private static final long serialVersionUID

Constant Value: -5384500866129738074 (0xb54668fd958dc6a6)

Fields

private Calendar _value

private static final SimpleDateFormat zulu

a shared java.text.SimpleDateFormat instance used for parsing the basic component of the timestamp

Public Constructors

public Time (Calendar value)

Initialize with a Calender, year month and date are ignored

Parameters
value Initial value

public Time (String value)

Converts a string formatted as HH:mm:ss[.SSS][+/-offset]

Parameters
value Value
Throws
NumberFormatException failed to parse value

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

Public Methods

public boolean equals (Object obj)

Parameters
obj

public long getTimeInMillis ()

Returns the time in milliseconds since midnight in UTC.

Returns
  • time in milli sec

public int hashCode ()

Returns the hashcode of the underlying calendar.

Returns
  • an int value

public String toString ()

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

Returns
  • string