|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.pow2.structures.tree.Node
Tree Node class.
Field Summary | |
protected Object |
data
node data object |
protected int |
depth
node depth level |
protected String |
id
node identifier |
protected Node |
left
left node |
protected boolean |
open
child nodes visibility |
protected Node |
parent
parent node |
protected Node |
right
right node |
Constructor Summary | |
Node()
Default constructor for Node object. |
|
Node(Object data)
Constructor for the Node object. |
|
Node(Object data,
int depth)
Constructor for the Node object. |
|
Node(String id,
Object data)
Constructor for the Node object |
Method Summary | |
void |
finalize()
Finalize this node. |
Object |
getData()
Gets the data attribute of the Node object |
int |
getDepth()
Gets the depth attribute of the Node object |
String |
getId()
Gets the id attribute of the ItemNode object |
Node |
getLeft()
Gets the left attribute of the Node object |
Node |
getParent()
Gets the parent attribute of the Node object |
Node |
getRight()
Gets the right attribute of the Node object |
boolean |
isOpen()
Test if the node is open. |
void |
setData(Object d)
Sets the data attribute of the Node object |
void |
setDepth(int depth)
Sets the depth attribute of the Node object |
void |
setId(long v)
Sets the id attribute of the Node object |
void |
setId(String v)
Sets the id attribute of the Node object |
void |
setLeft(Node l)
Sets the left attribute of the Node object |
void |
setOpening(boolean open)
Set the node orifice. |
void |
setParent(Node p)
Sets the parent attribute of the Node object |
void |
setRight(Node r)
Sets the right attribute of the Node object |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected String id
protected Object data
protected Node left
protected Node right
protected Node parent
protected int depth
protected boolean open
Constructor Detail |
public Node()
public Node(Object data)
data
- the node data objectpublic Node(Object data, int depth)
data
- the node data objectdepth
- the node depthpublic Node(String id, Object data)
id
- the node identifierMethod Detail |
public void setId(long v)
v
- The new id valuepublic void setId(String v)
v
- The new id valuepublic String getId()
public void setLeft(Node l)
l
- The new left valuepublic void setRight(Node r)
r
- The new right valuepublic void setParent(Node p)
p
- The new parent valuepublic void setData(Object d)
d
- The new data valuepublic Node getLeft()
public Node getRight()
public Node getParent()
public Object getData()
public boolean isOpen()
public void setOpening(boolean open)
open
- true to set the open
attribute to true;
false otherwise.public int getDepth()
public void setDepth(int depth)
depth
- The new depth valuepublic void finalize()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |