Class Time

java.lang.Object
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:
  • Constructor Summary

    Constructors
    Constructor
    Description
    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]
    Time(Calendar value)
    Initialize with a Calender, year month and date are ignored
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    long
    Returns the time in milliseconds since midnight in UTC.
    int
    Returns the hashcode of the underlying calendar.
    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 Details

    • 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 Details

    • 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