Package org.odftoolkit.odfdom.type
Class Time
java.lang.Object
org.odftoolkit.odfdom.type.Time
- All Implemented Interfaces:
OdfDataType
This class represents the in OpenDocument format used data type time
-
Constructor Summary
ConstructorDescriptionTime
(XMLGregorianCalendar time) Construct an newly Time object that represents the specified XMLGregorianCalendar value -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of this Time object as an XMLGregorianCalendarstatic boolean
isValid
(XMLGregorianCalendar time) check if the specified XMLGregorianCalendar instance is a valid time data typetoString()
Returns a String Object representing this Time valuestatic Time
Returns a Time instance representing the specified String value
-
Constructor Details
-
Time
Construct an newly Time object that represents the specified XMLGregorianCalendar value- Parameters:
time
- the value to be represented by the Time Object- Throws:
IllegalArgumentException
- if the given argument is not a valid Time
-
-
Method Details
-
toString
Returns a String Object representing this Time value -
valueOf
Returns a Time instance representing the specified String value- Parameters:
stringValue
- a String value- Returns:
- return a Time instance representing stringValue
- Throws:
IllegalArgumentException
- if the given argument is not a valid Time
-
getXMLGregorianCalendar
Returns the value of this Time object as an XMLGregorianCalendar- Returns:
- the XMLGregorianCalendar value of this Time object.
-
isValid
check if the specified XMLGregorianCalendar instance is a valid time data type- Parameters:
time
- the value to be tested- Returns:
- true if the value of argument is valid for time data type false otherwise
-