|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmapss.dif.graph.hierarchy.SuperNodeMap
public class SuperNodeMap
List of super nodes in a hierarchy. It simulates a doubly linked map so users can both give the super node and get the hierarchy and vice versa.
Hierarchy names should not be duplicated therefore it provides methods to check if a hierarchy name is previously defined in the list.
Entries are stored in the order they are added, getNodes()
and iterator()
methods maintain this order.
Constructor Summary | |
---|---|
protected |
SuperNodeMap()
Construct a super node map. |
Method Summary | |
---|---|
protected void |
_put(mocgraph.Node node,
Hierarchy hierarchy)
Adds a super node - hierarchy pair to the map. |
protected void |
_remove(mocgraph.Node node)
Removes a super node - hierarchy pair from the map. |
boolean |
contains(Hierarchy hierarchy)
Returns true is a given hierarchy is defined as a sub-hierarchy. |
boolean |
contains(mocgraph.Node node)
Returns true is a given node is defined as a super node. |
mocgraph.Node |
get(Hierarchy hierarchy)
Returns the super node that contains the given sub-hierarchy. |
Hierarchy |
get(mocgraph.Node superNode)
Returns the sub-hierarchy that is contained in a super node. |
Hierarchy |
get(java.lang.String name)
Returns the sub-hierarchy that has the given name. |
java.util.List |
getNodes()
Returns a collection of nodes that are defined as super nodes. |
boolean |
isDefined(java.lang.String name)
Returns true if the given name is the name of another hierarchy. |
boolean |
isSubHierarchy(Hierarchy hierarchy)
Returns true if the hierarchy is a sub-hierarchy of this hierarchy. |
boolean |
isSuperNode(mocgraph.Node node)
Returns true if the node is a super node of this hierarchy. |
java.util.ListIterator |
iterator()
Returns an iterator over the super nodes. |
java.lang.String |
newName()
Returns a string that is guaranteed to be unused in this port list as a port name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected SuperNodeMap()
Method Detail |
---|
public boolean contains(Hierarchy hierarchy)
public boolean contains(mocgraph.Node node)
public mocgraph.Node get(Hierarchy hierarchy)
hierarchy
- A sub-hierarchy.
public Hierarchy get(mocgraph.Node superNode)
superNode
- A super node in the graph.
public Hierarchy get(java.lang.String name)
name
- Name that is being searched.
public java.util.List getNodes()
public boolean isDefined(java.lang.String name)
public boolean isSubHierarchy(Hierarchy hierarchy)
public boolean isSuperNode(mocgraph.Node node)
public java.util.ListIterator iterator()
public java.lang.String newName()
protected void _put(mocgraph.Node node, Hierarchy hierarchy)
node
- Node to be added.hierarchy
- Hierarchy to be addedprotected void _remove(mocgraph.Node node)
node
- Node to be removed.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |