org.odftoolkit.odfdom.type
Class Duration

java.lang.Object
  extended by 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


Constructor Summary
Duration(Duration duration)
          Construct DurationType by the parsing the given string
 
Method Summary
 Duration getValue()
          Returns the value of this DurationType object as an Duration
static boolean isValid(Duration duration)
          check if the specified Duration instance is a valid duration data type
 String toString()
          Returns a String Object representing this DurationType's value
static Duration valueOf(String stringValue)
          Returns a DurationType instance representing the specified String value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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

Overrides:
toString in class Object
Returns:
return a string representation of the value of this DurationType object

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.

isValid

public static boolean isValid(Duration duration)
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


Copyright © 2008-2017 The Apache Software Foundation. All Rights Reserved.