public class Node extends Object
Modifier and Type | Field and Description |
---|---|
protected List<Node> |
childNodes
List of child nodes in the tree below here.
|
protected NodeType |
nodeType
Type of node.
|
protected Object |
nodeValue
Value of the node.
|
protected Node |
parent
Parent of this node.
|
protected List<Node> |
properties
List of properties for the node.
|
Constructor and Description |
---|
Node(NodeType nodeType) |
Node(NodeType nodeType,
Object nodeValue) |
Modifier and Type | Method and Description |
---|---|
void |
addProperty(Node node) |
Node |
appendChildNode(Node node) |
Node |
clone(Node parent) |
Node |
getChildNode(int index) |
List<Node> |
getChildNodes() |
Node |
getFirstChild()
Access the first child node.
|
Node |
getNextChild()
Access the next node.
|
String |
getNodeChildId() |
String |
getNodeId() |
NodeType |
getNodeType() |
Object |
getNodeValue() |
Node |
getParent() |
List<Node> |
getProperties() |
boolean |
hasNextChild()
Return whether there is a "next" child node.
|
boolean |
hasProperties() |
Node |
insertChildNode(Node node) |
Node |
insertChildNode(Node node,
int position) |
void |
removeChildNode(Node node) |
void |
setNodeValue(Object val) |
void |
setParent(Node parent) |
void |
setPropertyAtPosition(int position,
Node node) |
String |
toString()
Method to print out the Node as a tree.
|
protected NodeType nodeType
protected Object nodeValue
protected Node parent
public Node(NodeType nodeType)
public NodeType getNodeType()
public void setNodeValue(Object val)
public Object getNodeValue()
public boolean hasProperties()
public void addProperty(Node node)
public void setPropertyAtPosition(int position, Node node)
public void removeChildNode(Node node)
public Node getChildNode(int index)
public Node getFirstChild()
public Node getNextChild()
getFirstChildhas been called before.
public boolean hasNextChild()
getFirstChildhas been called before.
public void setParent(Node parent)
public Node getParent()
public String getNodeId()
public String getNodeChildId()
public String toString()
Copyright © 2019. All rights reserved.