Class Node

java.lang.Object
com.sun.tools.txw2.model.Leaf
com.sun.tools.txw2.model.Node
All Implemented Interfaces:
Iterable<Leaf>, ParsedPattern
Direct Known Subclasses:
List, WriterNode

public abstract class Node extends Leaf implements Iterable<Leaf>
Node is a Leaf that has children. getting and setting the parent of a node, and for removing a node.
Since:
1.6, SAAJ 1.2 Children are orderless.
Author:
Kohsuke Kawaguchi
  • Field Details

    • leaf

      public Leaf leaf
      Children of this node.
  • Constructor Details

  • Method Details

    • iterator

      public final Iterator<Leaf> iterator()
      Iterates all the children.
      Specified by:
      iterator in interface Iterable<Leaf>
    • hasOneChild

      public final boolean hasOneChild()
      Returns true if this node has only one child node.
    • addChild

      public final void addChild(Leaf child)
      Adds the given Leaf and their sibling as children of this Node.