|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gumbo.util.Delegatables.DelegatableImm | +--gumbo.util.relation.Relations.RelationImm | +--gumbo.util.relation.TreeNodes.TreeNodeImm
A serializable immutable view wrapper for a target TreeNode. All accessors, including identity, forward to the target. All mutators throw an UnsupportedOperationException.
Constructor Summary | |
TreeNodes.TreeNodeImm(TreeNode target)
|
Method Summary | |
void |
addChild(int index,
TreeNode child)
Adds a child to this parent. |
void |
addChild(TreeNode child)
Adds a child to this parent. |
TreeNode |
findTreeNode(java.lang.Object delegator)
Convenience method for getting the tree node corresponding to a delegator in this tree node's relationship. |
Group |
getChildren()
Gets an immutable view of this parent's children. |
java.lang.Object |
getParent()
Gets the parent of this child relation. |
boolean |
hasChildren()
Returns true if this parent has any children, false if none. |
void |
implSetParent(TreeNode parent)
Used by the system to mutually set the parent of this child. |
void |
removeChild(TreeNode child)
Removes a child from this parent, and makes the child an orphan. |
Methods inherited from class gumbo.util.relation.Relations.RelationImm |
canFindRelation, dispose, findRelation, getAddedConnectionOut, getRelationship, getRemovingConnectionOut, implReadConnections, implWriteConnections, isDisposed, setRelationship |
Methods inherited from class gumbo.util.Delegatables.DelegatableImm |
getDelegator, initDelegator, isDelegatorInited |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface gumbo.util.relation.Relation |
canFindRelation, findRelation, getAddedConnectionOut, getRelationship, getRemovingConnectionOut, implReadConnections, implWriteConnections, setRelationship |
Methods inherited from interface gumbo.util.Disposable |
dispose, isDisposed |
Methods inherited from interface gumbo.util.Delegatable |
getDelegator, initDelegator, isDelegatorInited |
Constructor Detail |
public TreeNodes.TreeNodeImm(TreeNode target)
target
- Wrapped target. Never null.Method Detail |
public java.lang.Object getParent()
TreeNode
getParent
in interface TreeNode
public void addChild(TreeNode child)
TreeNode
addChild
in interface TreeNode
child
- Child relation. Never null. Unless otherwise noted,
duplicates are the same as a new child. Note that a SetList children
store will throw an exception for duplicates.public void addChild(int index, TreeNode child)
TreeNode
addChild
in interface TreeNode
index
- List index (>=0, <=size). If <0, same as
addChild(Object) regardless of children store type.child
- Child relation. Never null. Unless otherwise noted,
duplicates are ignored. Note that a SetList children store
will throw an exception for duplicates.public void removeChild(TreeNode child)
TreeNode
removeChild
in interface TreeNode
child
- Child relation. Never null. Unless otherwise noted,
a missing child is ignored.public boolean hasChildren()
TreeNode
hasChildren
in interface TreeNode
public Group getChildren()
TreeNode
getChildren
in interface TreeNode
public TreeNode findTreeNode(java.lang.Object delegator)
TreeNode
findTreeNode
in interface TreeNode
delegator
- The delegator. Never null.
public void implSetParent(TreeNode parent)
TreeNode
implSetParent
in interface TreeNode
parent
- Parent relation. Null if none (orphan).
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |