public class Node extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
Node.Type |
Constructor and Description |
---|
Node(String data) |
Node(String newCategoryName,
Node.Type type) |
Modifier and Type | Method and Description |
---|---|
Node |
addChild(Node child)
Adds a child to the list of children for this Node.
|
Node |
addChildCategory(String categoryName) |
void |
addChildColumnIndexes(int... columnIndexes) |
List<Node> |
getChildren()
Return the children of Node.
|
String |
getData() |
int |
getNumberOfChildren()
Returns the number of immediate children of this Node.
|
Node |
getParent() |
Node.Type |
getType() |
void |
insertChildAt(int index,
Node child)
Inserts a Node at the specified position in the child list.
|
void |
removeChildAt(int index)
Remove the Node element at index index of the List<Node>.
|
void |
setData(String data) |
void |
setParent(Node parent) |
void |
setType(Node.Type type) |
String |
toString() |
public Node(String data)
public Node getParent()
public void setParent(Node parent)
public void setType(Node.Type type)
public Node.Type getType()
public List<Node> getChildren()
public int getNumberOfChildren()
public Node addChild(Node child)
child
- a Node object to set.public void addChildColumnIndexes(int... columnIndexes)
public void insertChildAt(int index, Node child) throws IndexOutOfBoundsException
index
- the position to insert at.child
- the Node object to insert.IndexOutOfBoundsException
- if thrown.public void removeChildAt(int index) throws IndexOutOfBoundsException
index
- the index of the element to delete.IndexOutOfBoundsException
- if thrown.public String getData()
public void setData(String data)
Copyright © 2013. All Rights Reserved.