Package com.sforce.ws.types
Class Time
- java.lang.Object
-
- com.sforce.ws.types.Time
-
- All Implemented Interfaces:
java.io.Serializable
public class Time extends java.lang.Object implements java.io.SerializableClass 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(java.lang.String value)Converts a string formatted as HH:mm:ss[.SSS][+/-offset]Time(java.util.Calendar value)Initialize with a Calender, year month and date are ignored
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)longgetTimeInMillis()Returns the time in milliseconds since midnight in UTC.inthashCode()Returns the hashcode of the underlying calendar.java.lang.StringtoString()stringify method returns the time as it would be in GMT, only accurate to the second...millis probably get lost.
-
-
-
Constructor Detail
-
Time
public Time(java.util.Calendar value)
Initialize with a Calender, year month and date are ignored- Parameters:
value- initial value
-
Time
public Time(java.lang.String value) throws java.lang.NumberFormatExceptionConverts a string formatted as HH:mm:ss[.SSS][+/-offset]- Parameters:
value- value- Throws:
java.lang.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 java.lang.String toString()
stringify method returns the time as it would be in GMT, only accurate to the second...millis probably get lost.- Overrides:
toStringin classjava.lang.Object- Returns:
- string
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
Returns the hashcode of the underlying calendar.- Overrides:
hashCodein classjava.lang.Object- Returns:
- an
intvalue
-
-