java.lang.Cloneable, Nodepublic final class NodeImpl extends java.lang.Object implements Node, java.lang.Cloneable
Node. This is used by AbstractSyntaxTree.| Constructor | Description |
|---|---|
NodeImpl(NodeMetadata value) |
| Modifier and Type | Method | Description |
|---|---|---|
Node |
addChildNode(Node node) |
Add children node.
|
Node |
addLeaf(Token token) |
Add leaf.
|
void |
clear() |
Delete all nodes and leaves.
|
Node |
clone() |
|
int |
count() |
Return count of child nodes.
|
java.lang.String |
getDelimiter() |
Leaves is separated by delimiter.
|
java.util.List<Token> |
getLeaves() |
Get leaves.
|
NodeMetadata |
getNodeMetadata() |
Get node metadata.
|
java.util.List<Node> |
getNodes() |
Get children nodes.
|
boolean |
isEmpty() |
Return true if
this does not contain other nodes. |
Node |
setDelimiter(java.lang.String c) |
Leaves is separated by delimiter.
|
NodeMetadata |
setNodeMetadata(NodeMetadata nodeMetadata) |
Set node metadata.
|
public NodeImpl(NodeMetadata value)
public Node addChildNode(Node node)
NodeaddChildNode in interface Nodepublic NodeMetadata getNodeMetadata()
NodegetNodeMetadata in interface Nodepublic NodeMetadata setNodeMetadata(NodeMetadata nodeMetadata)
NodesetNodeMetadata in interface Nodepublic void clear()
Nodepublic java.util.List<Token> getLeaves()
Nodepublic java.util.List<Node> getNodes()
Nodepublic boolean isEmpty()
Nodethis does not contain other nodes.public int count()
Nodepublic Node setDelimiter(java.lang.String c)
NodesetDelimiter in interface Nodepublic java.lang.String getDelimiter()
NodegetDelimiter in interface Nodepublic Node clone() throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedException