Package net.didion.jwnl.data.list
Class PointerTargetTree
java.lang.Object
net.didion.jwnl.data.list.PointerTargetTree
A container for the root node of a pointer target tree.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPointerTargetTree
(PointerTargetTreeNode rootNode) PointerTargetTree
(Synset synset, PointerTargetTreeNodeList list) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Two PointerTargetTree's are equal if their root nodes are equal.findAll
(PointerTargetTreeNode node) Find all occurances ofnode
in the tree.findAll
(PointerTarget target) Find all nodes in the tree whose target is targetFind the first occurance ofnode
in the tree.findFirst
(PointerTarget target) Find the first node in the tree whose target is targetWalk the tree and perform the operationopr
on each node.Walk the tree and perform the operationopr
on each node.void
print()
reverse()
Reverse this tree.toList()
Convert this tree to an List of PointerTargetNodeLists.
-
Field Details
-
_rootNode
-
-
Constructor Details
-
PointerTargetTree
-
PointerTargetTree
-
-
Method Details
-
getRootNode
-
equals
Two PointerTargetTree's are equal if their root nodes are equal. -
getFirstMatch
Walk the tree and perform the operationopr
on each node. Continues until either opr returns a non-null value, or it reaches the last node in the tree. -
getAllMatches
Walk the tree and perform the operationopr
on each node. Searchs the tree exhaustively and returns a List containing all nodes that are returned byopr
. -
findFirst
Find the first occurance ofnode
in the tree. -
findFirst
Find the first node in the tree whose target is target -
findAll
Find all occurances ofnode
in the tree. -
findAll
Find all nodes in the tree whose target is target -
print
public void print() -
reverse
Reverse this tree. A reversal is done by converting this tree to lists and then reversing each of the lists. The structure of the tree is unaffected by this operation. -
toList
Convert this tree to an List of PointerTargetNodeLists. This creates one list for each unique path through the tree.
-