public class

DurationConverter

extends AbstractSingleValueConverter
java.lang.Object
   ↳ com.thoughtworks.xstream.converters.basic.AbstractSingleValueConverter
     ↳ com.thoughtworks.xstream.converters.extended.DurationConverter

Class Overview

A Converter for the XML Schema datatype duration and the Java type javax.xml.datatype.Duration Duration.

Summary

Public Constructors
DurationConverter()
DurationConverter(DatatypeFactory factory)
Public Methods
boolean canConvert(Class c)
Determines whether the converter can marshall a particular type.
Object fromString(String s)
Unmarshals an Object from its single value representation.
[Expand]
Inherited Methods
From class com.thoughtworks.xstream.converters.basic.AbstractSingleValueConverter
From class java.lang.Object
From interface com.thoughtworks.xstream.converters.ConverterMatcher
From interface com.thoughtworks.xstream.converters.SingleValueConverter

Public Constructors

public DurationConverter ()

Throws
DatatypeConfigurationException

public DurationConverter (DatatypeFactory factory)

Public Methods

public boolean canConvert (Class c)

Determines whether the converter can marshall a particular type.

Parameters
c the Class representing the object type to be converted

public Object fromString (String s)

Unmarshals an Object from its single value representation.

Parameters
s the String with the single value of the Object
Returns
  • the Object