|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
| Method Summary | |
void |
changeElement(java.lang.Object e)
Changes the element of this Position. |
java.util.ArrayList |
elements(java.util.ArrayList v)
Recursively enumerates the elements of this container. |
int |
getSize(int s)
Recursively gets the size of this container. |
void |
invalidate()
Makes this node invalid. |
boolean |
isExternal()
Tests if this node is external. |
boolean |
isValid()
Tests if this BTNode is valid. |
BTNode |
left()
Returns this BTNode's left child. |
boolean |
onLeft()
Tests if this node is a left child of its parent. |
BTNode |
parent()
Returns the parent of this node. |
java.util.ArrayList |
positions(java.util.ArrayList v)
Recursively enumerates the positions of this container. |
BTNode |
right()
Returns this BTNode's left child. |
void |
setLeft(BTNode n)
Changes this node's left child. |
void |
setParent(BTNode n)
Changes this node's parent. |
void |
setRight(BTNode n)
Changes this node's right child. |
void |
toExternal()
Makes this node external |
void |
toInternal()
Makes this node internal |
| Methods inherited from interface jdsl.Position |
container,
element |
| Method Detail |
public BTNode left()
throws InvalidPositionException,
BoundaryViolationException
BTNode's left child.Positioninvalidate,
checkValid
public BTNode right()
throws InvalidPositionException,
BoundaryViolationException
BTNode's left child.Positioninvalidate,
checkValid
public BTNode parent()
throws InvalidPositionException,
BoundaryViolationException
invalidate,
checkValid
public void changeElement(java.lang.Object e)
throws InvalidElementException
Position.invalidate,
checkValid
public void invalidate()
throws InvalidElementException
checkValidpublic boolean isValid()
BTNode is valid.true if this BTNode is valid,
false otherwise.
public void setLeft(BTNode n)
throws InvalidPositionException,
BoundaryViolationException
invalidate,
checkValid,
setRight,
setParent
public void setRight(BTNode n)
throws InvalidPositionException,
BoundaryViolationException
invalidate,
isValid,
setLeft,
setParent
public void setParent(BTNode n)
throws InvalidPositionException,
BoundaryViolationException
invalidate,
isValid,
setLeft,
setRight
public boolean onLeft()
throws InvalidPositionException
true if this position is a left child,
false otherwise.isValid,
invalidatepublic java.util.ArrayList elements(java.util.ArrayList v)
v - The ArrayLisy to store the elements in.public int getSize(int s)
size - the running total size of this container.public java.util.ArrayList positions(java.util.ArrayList v)
v - The ArrayList to store the positions in.
public boolean isExternal()
throws InvalidPositionException
true if this position is external,
false if not.invalidate,
isValid
public void toExternal()
throws InvalidPositionException
invalidate,
isValid
public void toInternal()
throws InvalidPositionException
invalidate,
isValid
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||