Package org.scijava.util
Interface TreeNode<T>
-
- Type Parameters:
T- type of data associated with the node
- All Known Implementing Classes:
DefaultTreeNode
public interface TreeNode<T>A wrapper around a data object, for storing it in a tree structure.- Author:
- Alison Walter
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidaddChildren(List<? extends TreeNode<?>> nodes)Adds the given list of children to this node.List<TreeNode<?>>children()Gets the node's children.Tdata()Gets the data associated with the node.TreeNode<?>parent()Gets the parent of this node.voidsetParent(TreeNode<?> parent)
-
-
-
Method Detail
-
data
T data()
Gets the data associated with the node.
-
parent
TreeNode<?> parent()
Gets the parent of this node.
-
setParent
void setParent(TreeNode<?> parent)
-
children
List<TreeNode<?>> children()
Gets the node's children. If this list is mutated, the children will be affected accordingly. It is the responsibility of the caller to ensure continued integrity, particularly of parent linkages.
-
-