Package ec.gp.ge

# Class GrammarNode

java.lang.Object
ec.gp.ge.GrammarNode

All Implemented Interfaces:
  `Serializable`

Direct Known Subclasses:
  `GrammarFunctionNode`, `GrammarRuleNode`

public abstract class GrammarNode extends Object implements Serializable
The abstract superclass of nodes used by GrammarParser to construct a parse graph to generate GEIndividuals. GrammarNode has a *head*, which typically holds the name of the node, and an array of *children*, which are themselves GrammarNodes.

See Also:
  - Serialized Form

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected ArrayList<GrammarNode>`
  `children`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `GrammarNode(String head)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object o)`
  This is needed when we use a GrammarNode as a "key" in hash-map, see GrammarParser.java for details.
  `String`
  `getHead()`
  `int`
  `hashCode()`
  As usual
  `abstract String`
  `toString()`

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

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### children

    protected ArrayList<GrammarNode> children

- ## Constructor Details

  - ### GrammarNode

    public GrammarNode(String head)

- ## Method Details

  - ### getHead

    public String getHead()

  - ### toString

    public abstract String toString()
    Overrides:
      `toString` in class `Object`

  - ### equals

    public boolean equals(Object o)
    This is needed when we use a GrammarNode as a "key" in hash-map, see GrammarParser.java for details.
    Overrides:
      `equals` in class `Object`

  - ### hashCode

    public int hashCode()
    As usual
    Overrides:
      `hashCode` in class `Object`