org.odftoolkit.odfdom.type
Class Time

java.lang.Object
  extended by 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
Time(XMLGregorianCalendar time)
          Construct an newly Time object that represents the specified XMLGregorianCalendar value
 
Method Summary
 XMLGregorianCalendar getXMLGregorianCalendar()
          Returns the value of this Time object as an XMLGregorianCalendar
static boolean isValid(XMLGregorianCalendar time)
          check if the specified XMLGregorianCalendar instance is a valid time data type
 String toString()
          Returns a String Object representing this Time value
static Time valueOf(String stringValue)
          Returns a Time 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

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

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

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


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