java.lang.Objectorg.objectweb.telosys.common.data.TreeNode
Generic TreeNode to build objects trees
Constructor Summary | |
TreeNode(java.lang.Object object)
Constructs a new TreeNode |
|
TreeNode(java.lang.Object object,
int type)
Constructs a new TreeNode with a type |
|
TreeNode(java.lang.Object object,
java.lang.String id)
Constructs a new TreeNode with an id |
|
TreeNode(java.lang.Object object,
java.lang.String id,
int type)
Constructs a new TreeNode with an id and a type |
Method Summary | |
boolean |
appendChild(TreeNode node)
Appends a node at the end of the children of the node ( like W3C DOM ) |
TreeNodeList |
getChildNodes()
Returns all the children of the node ( like W3C DOM ) |
java.lang.String |
getId()
Returns the id of the node |
java.lang.Object |
getObject()
Returns the object held by the node |
int |
getType()
Returns the type of the node |
boolean |
hasChildNodes()
Returns true if the node has children ( like W3C DOM ) |
void |
setId(java.lang.String v)
Set the id of the node |
void |
setObject(java.lang.Object v)
Set the object held by the node |
void |
setType(int v)
Set the type of the node |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public TreeNode(java.lang.Object object)
object
- public TreeNode(java.lang.Object object, int type)
object
- type
- public TreeNode(java.lang.Object object, java.lang.String id)
object
- id
- public TreeNode(java.lang.Object object, java.lang.String id, int type)
object
- id
- type
- Method Detail |
public void setObject(java.lang.Object v)
v
- public java.lang.Object getObject()
public void setType(int v)
v
- public int getType()
public void setId(java.lang.String v)
v
- public java.lang.String getId()
public TreeNodeList getChildNodes()
public boolean hasChildNodes()
public boolean appendChild(TreeNode node)
node
-
public java.lang.String toString()