Class Time
- java.lang.Object
-
- org.apache.axis2.databinding.types.Time
-
- All Implemented Interfaces:
Serializable
public class Time extends Object implements Serializable
Class that represents the xsd:time XML Schema type- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
Calendar
getAsCalendar()
Returns the time as a calendar.int
hashCode()
Returns the hashcode of the underlying calendar.void
setTime(Calendar date)
Sets the time; ignores year, month, datevoid
setTime(Date date)
Sets the time from a date instance.String
toString()
Returns the time as it would be in GMT.
-
-
-
Constructor Detail
-
Time
public Time(Calendar value)
Initializes with a Calender. Year, month and date are ignored.
-
Time
public Time(String value) throws NumberFormatException
Converts a string formatted as HH:mm:ss[.SSS][+/-offset]- Throws:
NumberFormatException
-
-
Method Detail
-
getAsCalendar
public Calendar getAsCalendar()
Returns the time as a calendar. Ignores the year, month and date fields.- Returns:
- Returns calendar value; may be null.
-
setTime
public void setTime(Calendar date)
Sets the time; ignores year, month, date- Parameters:
date
-
-
setTime
public void setTime(Date date)
Sets the time from a date instance.- Parameters:
date
-
-
toString
public String toString()
Returns the time as it would be in GMT. This is accurate to the seconds. Milliseconds probably gets lost.
-
-