org.licas.parsers.types

## Class StackParser

- java.lang.Object
- - org.licas.parsers.types.ListParser
  - - org.licas.parsers.types.VectorParser
    - - org.licas.parsers.types.StackParser

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

      public class StackParser
      extends VectorParser

  This class parses standard `Stack` structures. This includes parsing nested lists and any objects that they might store.
  Author:
    Kieran Greer

- - ### Field Summary

    - ### Fields inherited from class org.licas.parsers.types.ListParser

      `ARRAYCLASS`

  - ### Constructor Summary

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

  - ### 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 the information to return a list of the values.
    `org.licas_xml.abs.Element` | `serialize(java.lang.Object toSerialize)` Serialize a ArrayList to generate an xml representation.

    - ### Methods inherited from class org.licas.parsers.types.VectorParser

      `elementToVector, vectorToElement`

    - ### Methods inherited from class org.licas.parsers.types.ListParser

      `createAddListObject, createAddMapObject, isList`

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

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

- - ### Constructor Detail

    - #### StackParser

          public StackParser()

      Creates a new instance of StackParser

  - ### Method Detail

    - #### parse

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

      Parse the information to return a list of the values.
      Specified by:
        `parse` in interface `org.ai_heuristic.def.ParserDef`
      Overrides:
        `parse` in class `VectorParser`
      Parameters:
        `toParse` - a description of the data.
      Returns:
        a ArrayList with real values contained.
      Throws:
        `java.lang.Exception` - any error.

    - #### serialize

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

      Serialize a ArrayList to generate an xml representation.
      Specified by:
        `serialize` in interface `org.ai_heuristic.def.ParserDef`
      Overrides:
        `serialize` in class `VectorParser`
      Parameters:
        `toSerialize` - the data list.
      Returns:
        an element if a list or the original object if not a list.
      Throws:
        `java.lang.Exception` - any error.