org.licas.parsers.types

## Class DateParser

- java.lang.Object
- - org.licas.parsers.types.DateParser

- All Implemented Interfaces:
    org.ai_heuristic.def.ParserDef

      public class DateParser
      extends java.lang.Object
      implements org.ai_heuristic.def.ParserDef

  This class serialises and parses a `Date` object to or from XML.
  Author:
    Kieran Greer

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DateParser()` Creates a new instance of DateParser

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `parse(org.licas_xml.abs.Element toParse)` Parse an XML description of a `Date` object back into a Java object.
    `org.licas_xml.abs.Element` | `serialize(java.lang.Object toSerialize)` Serialize a `Date` object to XML.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DateParser

          public DateParser()

      Creates a new instance of DateParser

  - ### Method Detail

    - #### serialize

          public org.licas_xml.abs.Element serialize(java.lang.Object toSerialize)
                                              throws java.lang.Exception

      Serialize a `Date` object to XML.
      Specified by:
        `serialize` in interface `org.ai_heuristic.def.ParserDef`
      Parameters:
        `toSerialize` - the ByteArray object to serialize.
      Returns:
        an XML description of the object.
      Throws:
        `java.lang.Exception` - any error.

    - #### parse

          public java.lang.Object parse(org.licas_xml.abs.Element toParse)
                                 throws java.lang.Exception

      Parse an XML description of a `Date` object back into a Java object.
      Specified by:
        `parse` in interface `org.ai_heuristic.def.ParserDef`
      Parameters:
        `toParse` - the XML description to parse.
      Returns:
        the Date object that is created.
      Throws:
        `java.lang.Exception` - any error.