Modifier and Type | Method and Description |
---|---|
UnorderedTree<E> |
UnorderedTree.find(E element)
Finds a node of the first occurrence of the given element in this tree.
|
UnorderedTree<E> |
UnorderedTree.findChild(E element)
Finds a child of the first occurrence of the given element in this node.
|
UnorderedTree<E> |
UnorderedTree.getParent()
Returns the parent of this node.
|
UnorderedTree<E> |
UnorderedTree.getRoot()
Returns the root of this tree.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<UnorderedTree<E>> |
UnorderedTree.getAncestors()
Returns a list of ancestors of this node, ordered from the root to the parent of this node.
|
com.google.common.collect.Multiset<UnorderedTree<E>> |
UnorderedTree.getChildren()
Returns a set of children of this node.
|
java.util.List<UnorderedTree<E>> |
UnorderedTree.getLeaves()
Returns a list of leaves in this tree in a natural order.
|
com.google.common.collect.Multiset<UnorderedTree<E>> |
UnorderedTree.getSiblings()
Returns a list of siblings of this node.
|
java.util.List<UnorderedTree<E>> |
UnorderedTree.getSubtrees()
Returns a list of subtrees of this tree.
|
java.util.List<UnorderedTree<E>> |
UnorderedTree.getUnorderedTreeNodes()
Returns a list of all nodes of the type
UnorderedTree<E> in this tree. |
Modifier and Type | Method and Description |
---|---|
void |
UnorderedTree.add(UnorderedTree<E> child)
Adds the given child to this node.
|
void |
UnorderedTree.addChild(UnorderedTree<E> child)
Adds the given child to this node.
|
boolean |
UnorderedTree.hasChild(UnorderedTree<E> child)
Returns
true if this node has the given child. |
void |
UnorderedTree.removeChild(UnorderedTree<E> child)
Removes the given child.
|
void |
UnorderedTree.setParent(UnorderedTree<E> parent)
Sets the given parent to this node.
|