| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public <T extends Node> T | |
| public <T extends Node> T | |
| public <T extends Node> T | |
| public int | |
| public Node | |
| public void |
| accept | back to summary |
|---|---|
| public void accept(Visitor visitor) Accept the visitor and allow it to perform actions on this Node. | |
| copy | back to summary |
|---|---|
| public <T extends Node> T copy(Class<T> cls) Make a deep copy of this node. If nn = n.copy(), then n.parent() == nn.parent(), which also means that the parent is NOT copied. | |
| copy | back to summary |
|---|---|
| public <T extends Node> T copy(Node newParent, Class<T> cls) Copy setting a new parent in the result. | |
| getAncestor | back to summary |
|---|---|
| public <T extends Node> T getAncestor(Class<T> type) Return the first ancestor of this node of the given type, if any. Throws IllegalArgumentException if not found. | |
| id | back to summary |
|---|---|
| public int id() Return the unique ID of this node. This starts at 1 and is incremented for each new Node that is created. | |
| parent | back to summary |
|---|---|
| public Node parent() Return the Node that contains (and created) this Node. | |
| parent | back to summary |
|---|---|
| public void parent(Node node) Set the parent to a new value. Should only be called inside NodeBase. | |