org.exolab.castor.types
Class Time
java.lang.Object
|
+--org.exolab.castor.types.RecurringDurationBase
|
+--org.exolab.castor.types.Time
- public class Time
- extends RecurringDurationBase
Describe an XML schema Time.
The time type is derived from recurringDuration by setting up the facet:
- duration to "P0Y"
- period to "P1D"
The format is defined by W3C XML Schema draft and ISO8601
i.e (+|-)hh:mm:ss.sss(Z|(+|-)hh:mm)
- Version:
- $Revision: 1.5 $
- Author:
- Arnaud Blandin
- See Also:
RecurringDuration
, Serialized Form
Constructor Summary |
Time()
|
Method Summary |
static Time |
parse(java.lang.String str)
parse a String and convert it into a Time |
java.util.Date |
toDate()
convert this Time into a local Date |
java.lang.String |
toString()
convert this Time to a string
The format is defined by W3C XML Schema draft and ISO8601
i.e (+|-)hh:mm:ss.sss(Z|(+|-)hh:mm) |
Methods inherited from class org.exolab.castor.types.RecurringDurationBase |
equal,
equals,
getDuration,
getHour,
getMilli,
getMinute,
getPeriod,
getSeconds,
getValues,
getZoneHour,
getZoneMinute,
isGreater,
isNegative,
isUTC,
isZoneNegative,
setDuration,
setDuration,
setHour,
setMinute,
setNegative,
setPeriod,
setPeriod,
setSecond,
setUTC,
setValues,
setZone,
setZoneNegative |
Methods inherited from class java.lang.Object |
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Time
public Time()
toDate
public java.util.Date toDate()
throws java.text.ParseException
- convert this Time into a local Date
- Returns:
- a local date representing this Time
- Throws:
- java.text.ParseException -
toString
public java.lang.String toString()
- convert this Time to a string
The format is defined by W3C XML Schema draft and ISO8601
i.e (+|-)hh:mm:ss.sss(Z|(+|-)hh:mm)
- Overrides:
- toString in class java.lang.Object
- Returns:
- a string representing this Time
parse
public static Time parse(java.lang.String str)
throws java.text.ParseException
- parse a String and convert it into a Time
- Parameters:
str
- the string to parse- Returns:
- the Time represented by the string
- Throws:
- java.text.ParseException - a parse exception is thrown if the string to parse
does not follow the rigth format (see the description
of this class)
Intalio Inc. (C) 1999-2001. All rights reserved http://www.intalio.com