-
- All Known Implementing Classes:
TextContainer,TokenizedParagraph,TokenizedSentence,TokenizedText,TokenizedWord
public interface TextNodeInterface for a node in aTextContainertree.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetChildCount()Get the number of direct children of this node.List<TextContainer>getChildren()Get the ordered list of direct children of this node.ListIterator<TextContainer>getIterator()Get an iterator over all descendants of this node including this node.ListIterator<TextContainer>getIterator(TextElementType type)Get an iterator over the node and all descendants of this node of the specified type.TextNodegetNextSibling()Get the right sibling of this node or null if this node has no right sibling.TextNodegetParent()Get the parent node of this node or null if this node is the root.TextNodegetPrevSibling()Get the left sibling of this node or null if this node has no left sibling.
-
-
-
Method Detail
-
getChildCount
int getChildCount()
Get the number of direct children of this node.- Returns:
- the child count of this node
-
getParent
TextNode getParent()
Get the parent node of this node or null if this node is the root.- Returns:
- the parent node of this node
-
getPrevSibling
TextNode getPrevSibling()
Get the left sibling of this node or null if this node has no left sibling.- Returns:
- the previous sibling node of this node
-
getNextSibling
TextNode getNextSibling()
Get the right sibling of this node or null if this node has no right sibling.- Returns:
- the next sibling node of this node
-
getChildren
List<TextContainer> getChildren()
Get the ordered list of direct children of this node.- Returns:
- a list of the child nodes
-
getIterator
ListIterator<TextContainer> getIterator()
Get an iterator over all descendants of this node including this node.- Returns:
- a list iterator over the node and all descendants
-
getIterator
ListIterator<TextContainer> getIterator(TextElementType type)
Get an iterator over the node and all descendants of this node of the specified type.- Parameters:
type- the type of nodes to iterate over- Returns:
- a list iterator over the selected nodes
-
-