public abstract class AbstractNode<T> extends Object implements Node<T>
Constructor and Description |
---|
AbstractNode() |
Modifier and Type | Method and Description |
---|---|
List<T> |
getElementPath()
Returns the node elements in the path from the root, to get to this node.
|
int |
getLevel()
Returns the number of levels above this node.
|
List<Node<T>> |
getPath()
Returns the path from the root, to get to this node.
|
boolean |
isAncestor(Node<T> parent)
Return true if this node descends from parent OR is parent
|
boolean |
isChild(Node<T> parent)
Return true if this node is a child of parent
|
boolean |
isLeaf()
Return true if this is a leaf node (ie it has no children)
|
boolean |
isParent(Node<T> child)
Return true if this node is a parent of child
|
boolean |
isRoot()
Return true if this is the root node (ie it has no parent)
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getChildren, getElement, getParent
public AbstractNode()
public boolean isRoot()
public boolean isLeaf()
public int getLevel()
public List<Node<T>> getPath()
public List<T> getElementPath()
getElementPath
in interface Node<T>
public boolean isAncestor(Node<T> parent)
isAncestor
in interface Node<T>
Copyright © 2015 The Kuali Foundation. All rights reserved.