|
datastructures | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.datastructures.BTNode
Class implementing a node of a binary tree by storing references to an element, a parent node, a left node, and a right node.
Constructor Summary | |
BTNode()
Default constructor |
|
BTNode(Object element,
BTPosition parent,
BTPosition left,
BTPosition right)
Main constructor |
Method Summary | |
Object |
element()
Returns the element stored at this position. |
BTPosition |
getLeft()
|
BTPosition |
getParent()
|
BTPosition |
getRight()
|
void |
setElement(Object o)
|
void |
setLeft(BTPosition v)
|
void |
setParent(BTPosition v)
|
void |
setRight(BTPosition v)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public BTNode()
public BTNode(Object element, BTPosition parent, BTPosition left, BTPosition right)
Method Detail |
public Object element()
Position
element
in interface Position
public void setElement(Object o)
setElement
in interface BTPosition
public BTPosition getLeft()
getLeft
in interface BTPosition
public void setLeft(BTPosition v)
setLeft
in interface BTPosition
public BTPosition getRight()
getRight
in interface BTPosition
public void setRight(BTPosition v)
setRight
in interface BTPosition
public BTPosition getParent()
getParent
in interface BTPosition
public void setParent(BTPosition v)
setParent
in interface BTPosition
|
datastructures | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |