org.expasy.jpl.commons.collection.tree
Interface TreeView<T>
- Type Parameters:
T - the node type.
- All Known Subinterfaces:
- TreeNode<T>
- All Known Implementing Classes:
- TreeNodeImpl, TreeViewImpl
public interface TreeView<T>
A TreeView interface should be implemented by any tree like
structured read-only node.
- Version:
- 1.0
- Author:
- nikitin
getParent
TreeView<T> getParent()
- Returns:
- the parent node.
getChildren
List<? extends TreeView<T>> getChildren()
- Returns:
- the direct children of the node.
getLeaves
Set<? extends TreeView<T>> getLeaves()
- Returns:
- the tree leaves.
getNodes
Set<? extends TreeView<T>> getNodes()
- Returns:
- the tree nodes.
getNumberOfChildren
int getNumberOfChildren()
- Returns:
- the number of children of this node.
isRoot
boolean isRoot()
- Returns:
- true if root node.
isLeave
boolean isLeave()
- Returns:
- the parent node.
getChildAt
TreeView<T> getChildAt(int index)
- Returns:
- the child node at index.
getData
T getData()
- Returns:
- the node data.
Copyright (c) 2012 Swiss Institute of Bioinformatics. All rights reserved.