Class DurationConverter

  • All Implemented Interfaces:
    ConverterMatcher, SingleValueConverter

    public class DurationConverter
    extends AbstractSingleValueConverter
    A Converter for the XML Schema datatype duration and the Java type Duration. The implementation uses a DatatypeFactory to create Duration objects. If no factory is provided and the instantiation of the internal factory fails with a DatatypeConfigurationException, the converter will not claim the responsibility for Duration objects.
    Since:
    1.3
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private javax.xml.datatype.DatatypeFactory factory  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean canConvert​(java.lang.Class type)
      Determines whether the converter can marshall a particular type.
      java.lang.Object fromString​(java.lang.String s)
      Unmarshals an Object from its single value representation.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • factory

        private final javax.xml.datatype.DatatypeFactory factory
    • Constructor Detail

      • DurationConverter

        public DurationConverter()
      • DurationConverter

        public DurationConverter​(javax.xml.datatype.DatatypeFactory factory)