public class DefaultNode extends Object implements INode, Serializable
INode
implementation.Modifier and Type | Field and Description |
---|---|
protected List<INode> |
m_children |
protected Object |
m_data |
protected String |
m_id |
protected INode |
m_parent |
Constructor and Description |
---|
DefaultNode()
Default constructor.
|
DefaultNode(Object data)
Construct new instance and set data.
|
DefaultNode(Object data,
String id)
Construct new instance and set data and id.
|
Modifier and Type | Method and Description |
---|---|
void |
addChild(INode child)
Add child.
|
List<? extends INode> |
getChildren()
List of
INode children, in order. |
Object |
getData()
Row data.
|
String |
getId()
Row id.
|
INode |
getParent()
Node parent, or null for root.
|
void |
removeChild(INode child)
Remove child.
|
void |
setChildren(List<INode> children)
Set node children.
|
void |
setData(Object data)
Set node data.
|
void |
setId(String id)
Set node id.
|
void |
setParent(INode parent)
Set node parent.
|
protected Object m_data
protected String m_id
protected INode m_parent
public DefaultNode()
public DefaultNode(Object data)
data
- public INode getParent()
INode
public List<? extends INode> getChildren()
INode
INode
children, in order.
Empty list (non-null) for leaf nodes.getChildren
in interface INode
public void setData(Object data)
public void setId(String id)
id
- public void setParent(INode parent)
parent
- public void addChild(INode child)
child
- List.add(Object)
public void removeChild(INode child)
child
- List.remove(Object)