Class 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

      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
    • Constructor Detail

      • Time

        public Time​(Calendar value)
        Initialize with a Calender, year month and date are ignored
        Parameters:
        value - initial 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
      • hashCode

        public int hashCode()
        Returns the hashcode of the underlying calendar.
        Overrides:
        hashCode in class Object
        Returns:
        an int value