org.apache.axis2.databinding.types
Class Time

java.lang.Object
  extended byorg.apache.axis2.databinding.types.Time
All Implemented Interfaces:
java.io.Serializable

public class Time
extends java.lang.Object
implements java.io.Serializable

Class that represents the xsd:time XML Schema type

See Also:
Serialized Form

Constructor Summary
Time(java.util.Calendar value)
          Initializes with a Calender.
Time(java.lang.String value)
          Converts a string formatted as HH:mm:ss[.SSS][+/-offset]
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.util.Calendar getAsCalendar()
          Returns the time as a calendar.
 int hashCode()
          Returns the hashcode of the underlying calendar.
 void setTime(java.util.Calendar date)
          Sets the time; ignores year, month, date
 void setTime(java.util.Date date)
          Sets the time from a date instance.
 java.lang.String toString()
          Returns the time as it would be in GMT.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Time

public Time(java.util.Calendar value)
Initializes with a Calender. Year, month and date are ignored.


Time

public Time(java.lang.String value)
     throws java.lang.NumberFormatException
Converts a string formatted as HH:mm:ss[.SSS][+/-offset]

Method Detail

getAsCalendar

public java.util.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(java.util.Calendar date)
Sets the time; ignores year, month, date

Parameters:
date -

setTime

public void setTime(java.util.Date date)
Sets the time from a date instance.

Parameters:
date -

toString

public java.lang.String toString()
Returns the time as it would be in GMT. This is accurate to the seconds. Milliseconds probably gets lost.

Returns:
Returns String.

equals

public boolean equals(java.lang.Object obj)

hashCode

public int hashCode()
Returns the hashcode of the underlying calendar.

Returns:
Returns an int value.


Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.