public interface Node extends AttributedObject
Modifier and Type | Method and Description |
---|---|
void |
accept(Visitor visitor)
Accept the visitor and allow it to perform actions on this Node.
|
<T extends Node> |
copy(Class<T> cls)
Make a deep copy of this node.
|
<T extends Node> |
copy(Node newParent,
Class<T> cls)
Copy setting a new parent in the result.
|
<T extends Node> |
getAncestor(Class<T> type)
Return the first ancestor of this node of the given type, if any.
|
int |
id()
Return the unique ID of this node.
|
Node |
parent()
Return the Node that contains (and created) this Node.
|
void |
parent(Node node)
Set the parent to a new value.
|
attributes, get, set
Node parent()
int id()
void parent(Node node)
<T extends Node> T getAncestor(Class<T> type)
<T extends Node> T copy(Class<T> cls)
void accept(Visitor visitor)
Copyright © 2017 Oracle. All rights reserved.