Class EmptyToNullDateConverter

java.lang.Object
com.thoughtworks.xstream.converters.basic.AbstractSingleValueConverter
com.thoughtworks.xstream.converters.basic.DateConverter
esendex.sdk.java.parser.EmptyToNullDateConverter
All Implemented Interfaces:
com.thoughtworks.xstream.converters.ConverterMatcher, com.thoughtworks.xstream.converters.ErrorReporter, com.thoughtworks.xstream.converters.SingleValueConverter

public class EmptyToNullDateConverter extends com.thoughtworks.xstream.converters.basic.DateConverter
Date converter that converts empty elements to null.
Author:
Mike Whittaker
  • Constructor Summary

    Constructors
    Constructor
    Description
    Instantiates a new empty to null date converter.
  • Method Summary

    Modifier and Type
    Method
    Description
    Parses xml date element as per DateConverter except that empty elements are converted to null.

    Methods inherited from class com.thoughtworks.xstream.converters.basic.DateConverter

    appendErrors, canConvert, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • EmptyToNullDateConverter

      public EmptyToNullDateConverter()
      Instantiates a new empty to null date converter.
  • Method Details

    • fromString

      public Object fromString(String str)
      Parses xml date element as per DateConverter except that empty elements are converted to null.
      Specified by:
      fromString in interface com.thoughtworks.xstream.converters.SingleValueConverter
      Overrides:
      fromString in class com.thoughtworks.xstream.converters.basic.DateConverter
      Parameters:
      str - The element data to convert
      Returns:
      an Object of type Date