org.licas.parsers.sci

## Class KD_TreeParser

- java.lang.Object
- - org.licas.parsers.sci.KD_TreeParser

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

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

  This can be used to parse a whole `KD_Tree` tree structure, starting from the root tree node.
  Author:
    Kieran Greer

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `KD_TreeParser()` Create a new instance of KD_TreeParser

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.ai_heuristic.tree.KD_Tree` | `parse(org.licas_xml.abs.Element toParse)` Parse the XML element back into a KD_Tree object.
    `org.licas_xml.abs.Element` | `serialize(org.ai_heuristic.tree.KD_Tree tree)` Serialize the object into an XML element.
    `org.licas_xml.abs.Element` | `serialize(java.lang.Object toSerialize)` Serialize the object into an XML element.

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

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

- - ### Constructor Detail

    - #### KD_TreeParser

          public KD_TreeParser()

      Create a new instance of KD_TreeParser

  - ### Method Detail

    - #### serialize

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

      Serialize the object into an XML element.
      Specified by:
        `serialize` in interface `org.ai_heuristic.def.ParserDef`
      Parameters:
        `toSerialize` - the object to serialize. Of type `KD_Tree`.
      Returns:
        the serialized object.
      Throws:
        `java.lang.Exception` - any error.

    - #### serialize

          public org.licas_xml.abs.Element serialize(org.ai_heuristic.tree.KD_Tree tree)
                                              throws java.lang.Exception

      Serialize the object into an XML element.
      Parameters:
        `tree` - the Tree to serialize.
      Returns:
        the serialized object.
      Throws:
        `java.lang.Exception` - any error.

    - #### parse

          public org.ai_heuristic.tree.KD_Tree parse(org.licas_xml.abs.Element toParse)
                                              throws java.lang.Exception

      Parse the XML element back into a KD_Tree object.
      Specified by:
        `parse` in interface `org.ai_heuristic.def.ParserDef`
      Parameters:
        `toParse` - the element to parse.
      Returns:
        the parsed Tree.
      Throws:
        `java.lang.Exception` - any error.