|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Node
A node of an attributed tree (AT).
Each node except root
node has parent
node.
Accessor
can be used to work with node attributes.
Child
of node is an attribute's value or an element
of an indexed attribute that implement this interface and have this node
as parent.
Implementations of this interface should provide read-only attribute
"this"
whose value is object itself.
Method Summary | |
---|---|
void |
accept(Visitor visitor)
Accepts the specified visitor. |
Node |
getParent()
Gets the parent of this node. |
void |
makeChild(String name)
Makes a value of the specified attribute a child of this node. |
void |
resetParent()
Reset parent of this node. |
void |
setParent(Node parent)
Sets the parent of this node. |
Methods inherited from interface com.unitesk.atp.tree.Keyed |
---|
key, keyClass |
Method Detail |
---|
Node getParent()
null
only for root node.void setParent(Node parent)
parent
- The node to become parent of this node.
NullPointerException
- If parent
is null
.
IllegalArgumentException
- If parent was already set.resetParent()
void resetParent()
setParent(Node)
void makeChild(String name)
null
an attribute value or an element are allowed.
name
- The name of an attribute of this node.
IllegalArgumentException
- If the specified name is not a name of an attribute
of this node.
ClassCastException
- If a value of an attribute or an element
of indexed attribute does not implement
Node
interface.void accept(Visitor visitor)
Visitor
design pattern.
Each inherited node type NodeType
must override this method
to call void visitNodeType( NodeType node )
visitor's method.
visitor
- The visitor to accept.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |