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.
|
protected Symbol |
symbol |
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() |
Node |
getNextChild() |
String |
getNodeChildId() |
String |
getNodeId() |
NodeType |
getNodeType() |
Object |
getNodeValue() |
Node |
getParent() |
List<Node> |
getProperties() |
Symbol |
getSymbol() |
boolean |
hasNextChild() |
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) |
void |
setSymbol(Symbol symbol) |
String |
toString()
Method to print out the Node as a tree.
|
protected NodeType nodeType
protected Object nodeValue
protected Symbol symbol
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()
public boolean hasNextChild()
public Symbol getSymbol()
public void setSymbol(Symbol symbol)
public void setParent(Node parent)
public Node getParent()
public String getNodeId()
public String getNodeChildId()
public String toString()
Copyright © 2017. All rights reserved.