| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private static int | |
| private Node |
| Modifier and Type | Method and Description |
|---|---|
| public void | accept(Visitor visitor)
Implements org. Accept the visitor and allow it to perform actions on this Node. |
| public <T extends Node> T | copy(Class<T> cls)
Implements org. Make a deep copy of this node. |
| public <T extends Node> T | copy(Node newParent, Class<T> cls)
Implements org. Copy setting a new parent in the result. |
| public final <T extends Node> T | getAncestor(Class<T> type)
Implements org. Return the first ancestor of this node of the given type, if any. |
| private static synchronized int | |
| public int | |
| public final Node | parent()
Implements org. Return the Node that contains (and created) this Node. |
| public final void | parent(Node node)
Implements org. Set the parent to a new value. |
| public void | |
| public void | |
| public String |
| myId | back to summary |
|---|---|
| private int myId | |
| nextId | back to summary |
|---|---|
| private static int nextId | |
| parent | back to summary |
|---|---|
| private Node parent
| |
| NodeBase | back to summary |
|---|---|
| public NodeBase(Node parent) | |
| accept | back to summary |
|---|---|
| public void accept(Visitor visitor) Implements org. Doc from org. 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) Implements org. Doc from org. 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) Implements org. Doc from org. Copy setting a new parent in the result. | |
| getAncestor | back to summary |
|---|---|
| public final <T extends Node> T getAncestor(Class<T> type) Implements org. Doc from org. Return the first ancestor of this node of the given type, if any. Throws IllegalArgumentException if not found. | |
| getNewId | back to summary |
|---|---|
| private static synchronized int getNewId() | |
| id | back to summary |
|---|---|
| public int id() Implements org. Doc from org. 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 final Node parent() Implements org. Doc from org. Return the Node that contains (and created) this Node. | |
| parent | back to summary |
|---|---|
| public final void parent(Node node) Implements org. Doc from org. Set the parent to a new value. Should only be called inside NodeBase. | |
| postCopy | back to summary |
|---|---|
| public void postCopy() Overrides org. Implements org. | |
| preCopy | back to summary |
|---|---|
| public void preCopy() Overrides org. Implements org. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |