|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jdsl.core.ref.HashtableDecorable | +--jdsl.core.ref.NodeBinaryTree.NBTNode | +--jdsl.core.ref.NodeBinaryTree.NBTSuperNode
This is the supernode. There is one instance per tree, useful mainly so that container() calls can recur polymorphically up the tree Protected so subclasses can access it
Constructor Summary | |
protected |
NodeBinaryTree.NBTSuperNode(NodeBinaryTree t,
NodeBinaryTree.NBTNode root)
Constructs the super node with its tree and root |
Method Summary | |
protected NodeBinaryTree |
container()
O(1) time |
java.lang.Object |
element()
Should never be called |
protected void |
expand()
Should never be called |
protected boolean |
isInternal()
Should never be called |
protected boolean |
isSuperNode()
Used to determine if this node is the super node (overridden) |
protected boolean |
isValid()
Should never be called |
protected NodeBinaryTree.NBTNode |
left()
Should never be called |
protected void |
makeUncontained()
Should never be called |
protected NodeBinaryTree.NBTNode |
otherChild(NodeBinaryTree.NBTNode child)
Should never be called |
protected NodeBinaryTree.NBTNode |
parent()
Should never be called |
protected void |
removeSelfAndAbove()
Should never be called |
protected java.lang.Object |
replaceElement(java.lang.Object x)
Should never be called |
protected void |
replaceSelf(NodeBinaryTree.NBTNode x)
Should never be called |
protected NodeBinaryTree.NBTNode |
right()
Should never be called |
protected void |
setChild(NodeBinaryTree.NBTNode currchild,
NodeBinaryTree.NBTNode newchild)
O(1) time Sets this node's root; any other use of this method is invalid |
protected void |
setLeft()
Should never be called |
protected void |
setParent()
Should never be called |
protected void |
setRight()
Should never be called |
protected void |
setRoot(NodeBinaryTree.NBTNode root)
O(1) time Sets this node's root |
protected void |
swapWithNode(NodeBinaryTree.NBTNode x)
Should never be called |
Methods inherited from class jdsl.core.ref.NodeBinaryTree.NBTNode |
isLeftChild, setContainer, setLeft, setParent, setRight, toString |
Methods inherited from class jdsl.core.ref.HashtableDecorable |
capacity, destroy, get, has, hash, rehash, set, size |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface jdsl.core.api.Decorable |
destroy, get, has, set |
Constructor Detail |
protected NodeBinaryTree.NBTSuperNode(NodeBinaryTree t, NodeBinaryTree.NBTNode root)
Method Detail |
protected void setRoot(NodeBinaryTree.NBTNode root)
root
- The new rootprotected void setChild(NodeBinaryTree.NBTNode currchild, NodeBinaryTree.NBTNode newchild)
setChild
in class NodeBinaryTree.NBTNode
currchild
- The node to replace; hopefully the rootnewchild
- The new rootprotected NodeBinaryTree container()
NodeBinaryTree.NBTNode
container
in class NodeBinaryTree.NBTNode
public java.lang.Object element()
element
in class NodeBinaryTree.NBTNode
jdsl.core.api.Accessor
protected boolean isValid()
protected NodeBinaryTree.NBTNode parent()
parent
in class NodeBinaryTree.NBTNode
jdsl.core.ref.NodeBinaryTree.NBTNode
protected NodeBinaryTree.NBTNode left()
left
in class NodeBinaryTree.NBTNode
jdsl.core.ref.NodeBinaryTree.NBTNode
protected NodeBinaryTree.NBTNode right()
right
in class NodeBinaryTree.NBTNode
jdsl.core.ref.NodeBinaryTree.NBTNode
protected NodeBinaryTree.NBTNode otherChild(NodeBinaryTree.NBTNode child)
otherChild
in class NodeBinaryTree.NBTNode
jdsl.core.ref.NodeBinaryTree.NBTNode
one
- of my childrenprotected boolean isInternal()
isInternal
in class NodeBinaryTree.NBTNode
jdsl.core.ref.NodeBinaryTree.NBTNode
protected void setLeft()
protected void setRight()
protected void setParent()
protected void makeUncontained()
makeUncontained
in class NodeBinaryTree.NBTNode
protected void expand()
expand
in class NodeBinaryTree.NBTNode
protected void removeSelfAndAbove()
removeSelfAndAbove
in class NodeBinaryTree.NBTNode
protected void replaceSelf(NodeBinaryTree.NBTNode x)
replaceSelf
in class NodeBinaryTree.NBTNode
jdsl.core.ref.NodeBinaryTree.NBTNode
newSubtree
- the node to replace me withprotected void swapWithNode(NodeBinaryTree.NBTNode x)
protected java.lang.Object replaceElement(java.lang.Object x)
replaceElement
in class NodeBinaryTree.NBTNode
jdsl.core.ref.NodeBinaryTree.NBTNode
newElement
- my new elementprotected boolean isSuperNode()
isSuperNode
in class NodeBinaryTree.NBTNode
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |