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