|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface for adding weak nodes to the explorer, in this case nodes that can yield to nodes already in the explorer. This may typically look like:
public class SomeNode implements WeakExplorerNode { Object parent; public SomeNode(Object parent) { this.parent = parent; } public boolean subsumes(Object obj) { return obj instanceof SomeNode; } }
About subsumtion:
Method Summary | |
boolean |
subsumes(Object obj)
This method is called by ExplorerTreeModel to check if this WeakExplorerNode subsumes another WeakExplorerNode, ie if this node should be preserved rather than adding the other node. |
Method Detail |
public boolean subsumes(Object obj)
This relation should be reflexive, so that if a
is a WeakExplorerNode then a.subsumes(a) == true
.
This relation should be symmetric, so that if a and b are
WeakExplorerNodes and a.subsumes(b) == true
then
b.subsumes(a) == true
.
This relation should be transitive, so that if a, b and c are
WeakExplorerNodes, a.subsumes(b) == true
and
b.subsumes(c) == true
then
a.subsumes(c) == true
.
Note: While this means that only other WeakExplorerNodes can be subsumed, the argument is still of Object type. This is just since there is no particular point in getting a WeakExplorerNode reference, you would either have to down-cast it further or wouldn't use it more than as an Object pointer.
obj
- another WeakExplorerNode
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ArgoUML © 1996-2004 (20050222) | ArgoUML Homepage | ArgoUML Developers' page | ArgoUML Cookbook |