org.apache.uima.cas.impl

## Class AnnotationTreeNodeImpl<T extends AnnotationFS>

- java.lang.Object
- - org.apache.uima.cas.impl.AnnotationTreeNodeImpl<T>

- All Implemented Interfaces:
    AnnotationTreeNode<T>

      public class AnnotationTreeNodeImpl<T extends AnnotationFS>
      extends Object
      implements AnnotationTreeNode<T>

  TODO: Create type comment for AnnotationTreeNodeImpl.

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `T` | `get()` Return the annotation for this node.
    `AnnotationTreeNode<T>` | `getChild(int i)` Get the i-th child of this node.
    `int` | `getChildCount()` Get the number of children this node has.
    `ArrayList<AnnotationTreeNode<T>>` | `getChildren()` Get all children of this node as an ArrayList.
    `AnnotationTreeNode<T>` | `getNextSibling()` Get the next sibling (to the right) of this node.
    `AnnotationTreeNode<T>` | `getParent()` Get the parent of this node.
    `AnnotationTreeNode<T>` | `getPreviousSibling()` Get the previous sibling (to the left) of this node.

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

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

- - ### Method Detail

    - #### getParent

          public AnnotationTreeNode<T> getParent()

      Description copied from interface: `AnnotationTreeNode`
      Get the parent of this node.
      Specified by:
        `getParent` in interface `AnnotationTreeNode<T extends AnnotationFS>`
      Returns:
        The parent of this node, or `null` if this node has no parent (root).

    - #### getChildCount

          public int getChildCount()

      Description copied from interface: `AnnotationTreeNode`
      Get the number of children this node has.
      Specified by:
        `getChildCount` in interface `AnnotationTreeNode<T extends AnnotationFS>`
      Returns:
        The number of children.

    - #### getChild

          public AnnotationTreeNode<T> getChild(int i)
                                         throws CASRuntimeException

      Description copied from interface: `AnnotationTreeNode`
      Get the i-th child of this node.
      Specified by:
        `getChild` in interface `AnnotationTreeNode<T extends AnnotationFS>`
      Parameters:
        `i` - The index of the child.
      Returns:
        The i-th child.
      Throws:
        `CASRuntimeException` - If `i < 0` or `i >= getChildCount()`.

    - #### getNextSibling

          public AnnotationTreeNode<T> getNextSibling()

      Description copied from interface: `AnnotationTreeNode`
      Get the next sibling (to the right) of this node.
      Specified by:
        `getNextSibling` in interface `AnnotationTreeNode<T extends AnnotationFS>`
      Returns:
        The right sibling of this node, or `null` if no such sibling exists.

    - #### getPreviousSibling

          public AnnotationTreeNode<T> getPreviousSibling()

      Description copied from interface: `AnnotationTreeNode`
      Get the previous sibling (to the left) of this node.
      Specified by:
        `getPreviousSibling` in interface `AnnotationTreeNode<T extends AnnotationFS>`
      Returns:
        The left sibling of this node, or `null` if no such sibling exists.

    - #### getChildren

          public ArrayList<AnnotationTreeNode<T>> getChildren()

      Description copied from interface: `AnnotationTreeNode`
      Get all children of this node as an ArrayList.
      Specified by:
        `getChildren` in interface `AnnotationTreeNode<T extends AnnotationFS>`
      Returns:
        An ArrayList of the children.

    - #### get

          public T get()

      Description copied from interface: `AnnotationTreeNode`
      Return the annotation for this node.
      Specified by:
        `get` in interface `AnnotationTreeNode<T extends AnnotationFS>`
      Returns:
        The annotation for this node.

Copyright © 2006–2021 The Apache Software Foundation. All rights reserved.