Package org.odftoolkit.odfdom.type
Class Duration
java.lang.Object
org.odftoolkit.odfdom.type.Duration
- All Implemented Interfaces:
OdfDataType
,OdfFieldDataType
This class represents the in OpenDocument format used data type duration
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetValue()
Returns the value of this DurationType object as an Durationstatic boolean
check if the specified Duration instance is a valid duration data typetoString()
Returns a String Object representing this DurationType's valuestatic Duration
Returns a DurationType instance representing the specified String value
-
Constructor Details
-
Duration
Construct DurationType by the parsing the given string- Parameters:
duration
- The String to be parsed into DurationType- Throws:
IllegalArgumentException
- if the given argument is not a valid Duration
-
-
Method Details
-
toString
Returns a String Object representing this DurationType's value -
valueOf
Returns a DurationType instance representing the specified String value- Parameters:
stringValue
- a String value- Returns:
- return a DurationType instance representing stringValue
- Throws:
IllegalArgumentException
- if the given argument is not a valid Duration
-
getValue
Returns the value of this DurationType object as an Duration- Returns:
- the Duration value of this DurationType object.
-
isValid
check if the specified Duration instance is a valid duration data type- Parameters:
duration
- the value to be tested- Returns:
- true if the value of argument is valid for duration data type false otherwise
-