Package org.odftoolkit.odfdom.type
Class Time
- java.lang.Object
-
- org.odftoolkit.odfdom.type.Time
-
- All Implemented Interfaces:
OdfDataType
public class Time extends Object implements OdfDataType
This class represents the in OpenDocument format used data type time
-
-
Constructor Summary
Constructors Constructor Description Time(XMLGregorianCalendar time)
Construct an newly Time object that represents the specified XMLGregorianCalendar value
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description XMLGregorianCalendar
getXMLGregorianCalendar()
Returns the value of this Time object as an XMLGregorianCalendarstatic boolean
isValid(XMLGregorianCalendar time)
check if the specified XMLGregorianCalendar instance is a valid time data typeString
toString()
Returns a String Object representing this Time valuestatic Time
valueOf(String stringValue)
Returns a Time instance representing the specified String value
-
-
-
Constructor Detail
-
Time
public Time(XMLGregorianCalendar time) throws IllegalArgumentException
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 Detail
-
toString
public String toString()
Returns a String Object representing this Time value
-
valueOf
public static Time valueOf(String stringValue) throws IllegalArgumentException
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
public XMLGregorianCalendar getXMLGregorianCalendar()
Returns the value of this Time object as an XMLGregorianCalendar- Returns:
- the XMLGregorianCalendar value of this Time object.
-
isValid
public static boolean isValid(XMLGregorianCalendar time)
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
-
-