|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface TreeModel<E>
This interface provides a generic tree model. Only elements that the model provides are valid input parameters to the methods of the tree model.
| Method Summary | |
|---|---|
java.util.Iterator<E> |
getChildren(E aNode)
Returns an iterator over the child elements for the given node. |
E |
getParent(E aNode)
Returns the parent of a given node. |
E |
getRoot()
Returns the root node of the tree model. |
boolean |
hasChildren(E aNode)
Returns whether or not the given node has children. |
| Method Detail |
|---|
boolean hasChildren(E aNode)
throws ModelException,
ObjectNotFoundException
true - the iterator might be empty.
aNode - the node for which to check if it has children. If this node is
no element produced by this model, a runtime exception (such as a ClassCastException
or a NullPointerException) may occur.
false if it has no children, true if
children might be present.
ModelException - an error occurred during model operation
ObjectNotFoundException - the node or one of its children cannot be found in the model
java.util.Iterator<E> getChildren(E aNode)
throws ModelException,
ObjectNotFoundException
aNode - the node for which to return its children. If this node is
no element produced by this model, a runtime exception (such as a ClassCastException
or a NullPointerException) may occur.
ModelException - an error occurred during model operation
ObjectNotFoundException - the node or one of its children cannot be found in the model
E getParent(E aNode)
throws ModelException,
ObjectNotFoundException
aNode - the node for which to return its parent. If this node is
no element produced by this model, a runtime exception (such as a ClassCastException
or a NullPointerException) may occur.
null
if the node has no parent
ModelException - an error occurred during model operation
ObjectNotFoundException - the node or its parent could not be found
E getRoot()
throws ModelException,
ObjectNotFoundException
null if the model is empty.
ModelException - an error occurred during model operation
ObjectNotFoundException - the root node of the model could not be found
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||