public class NodeBase extends AttributedObjectBase implements Node, CopyInterceptor
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.
|
void |
postCopy() |
void |
preCopy() |
String |
toString() |
attributes, get, set
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
attributes, get, set
public NodeBase(Node parent)
public void preCopy()
preCopy
in interface CopyInterceptor
preCopy
in class AttributedObjectBase
public void postCopy()
postCopy
in interface CopyInterceptor
postCopy
in class AttributedObjectBase
public final <T extends Node> T getAncestor(Class<T> type)
Node
getAncestor
in interface Node
public int id()
Node
public final Node parent()
Node
public final void parent(Node node)
Node
public <T extends Node> T copy(Class<T> cls)
Node
public <T extends Node> T copy(Node newParent, Class<T> cls)
Node
Copyright © 2017 Oracle. All rights reserved.