Package 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>
-
Method Summary
Modifier and TypeMethodDescriptionget()Return the annotation for this node.getChild(int i) Get the i-th child of this node.intGet the number of children this node has.Get all children of this node as an ArrayList.Get the next sibling (to the right) of this node.Get the parent of this node.Get the previous sibling (to the left) of this node.
-
Method Details
-
getParent
Description copied from interface:AnnotationTreeNodeGet the parent of this node.- Specified by:
getParentin interfaceAnnotationTreeNode<T extends AnnotationFS>- Returns:
- The parent of this node, or
nullif this node has no parent (root).
-
getChildCount
public int getChildCount()Description copied from interface:AnnotationTreeNodeGet the number of children this node has.- Specified by:
getChildCountin interfaceAnnotationTreeNode<T extends AnnotationFS>- Returns:
- The number of children.
-
getChild
Description copied from interface:AnnotationTreeNodeGet the i-th child of this node.- Specified by:
getChildin interfaceAnnotationTreeNode<T extends AnnotationFS>- Parameters:
i- The index of the child.- Returns:
- The i-th child.
- Throws:
CASRuntimeException- Ifi < 0ori >= getChildCount().
-
getNextSibling
Description copied from interface:AnnotationTreeNodeGet the next sibling (to the right) of this node.- Specified by:
getNextSiblingin interfaceAnnotationTreeNode<T extends AnnotationFS>- Returns:
- The right sibling of this node, or
nullif no such sibling exists.
-
getPreviousSibling
Description copied from interface:AnnotationTreeNodeGet the previous sibling (to the left) of this node.- Specified by:
getPreviousSiblingin interfaceAnnotationTreeNode<T extends AnnotationFS>- Returns:
- The left sibling of this node, or
nullif no such sibling exists.
-
getChildren
Description copied from interface:AnnotationTreeNodeGet all children of this node as an ArrayList.- Specified by:
getChildrenin interfaceAnnotationTreeNode<T extends AnnotationFS>- Returns:
- An ArrayList of the children.
-
get
Description copied from interface:AnnotationTreeNodeReturn the annotation for this node.- Specified by:
getin interfaceAnnotationTreeNode<T extends AnnotationFS>- Returns:
- The annotation for this node.
-