|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
| Method Summary | |
java.util.Iterator |
children(container.Position v)
Returns an iterator of the children of a given node. |
java.util.Iterator |
elements()
Return an iterator of the elements stored in the tree. |
boolean |
isEmpty()
Returns whether the tree is empty. |
boolean |
isExternal(container.Position v)
Returns whether a given node is external. |
boolean |
isInternal(container.Position v)
Returns whether a given node is internal. |
boolean |
isRoot(container.Position v)
Returns whether a given node is the root of the tree. |
container.Position |
parent(container.Position v)
Returns the parent of a given node. |
java.util.Iterator |
positions()
Returns an iterator of the nodes stored in the tree. |
java.lang.Object |
replace(container.Position v,
java.lang.Object e)
Replaces the element stored at a given node. |
container.Position |
root()
Returns the root of the tree. |
int |
size()
Returns the number of nodes in the tree. |
| Method Detail |
public int size()
public boolean isEmpty()
public java.util.Iterator elements()
public java.util.Iterator positions()
public java.lang.Object replace(container.Position v,
java.lang.Object e)
throws InvalidPositionException
InvalidPositionException
public container.Position root()
throws EmptyTreeException
EmptyTreeException
public container.Position parent(container.Position v)
throws InvalidPositionException,
BoundaryViolationException
InvalidPositionException
BoundaryViolationException
public java.util.Iterator children(container.Position v)
throws InvalidPositionException
InvalidPositionException
public boolean isInternal(container.Position v)
throws InvalidPositionException
InvalidPositionException
public boolean isExternal(container.Position v)
throws InvalidPositionException
InvalidPositionException
public boolean isRoot(container.Position v)
throws InvalidPositionException
InvalidPositionException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||