org.argouml.ui.explorer
Interface WeakExplorerNode

All Known Implementing Classes:
AssociationsNode, AttributesNode, IncomingDependencyNode, InheritanceNode, OperationsNode, OutgoingDependencyNode

public interface WeakExplorerNode

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:

Since:
0.16.alpha1

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

subsumes

public 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.

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.

Parameters:
obj - another WeakExplorerNode
Returns:
true if this node subsumes obj, otherwise false.


ArgoUML © 1996-2004 (20050222)ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook