|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmapss.dif.graph.hierarchy.PortList
public class PortList
List of ports in a hierarchy. It provides methods to
check if a name is defined previously as a port or if an edge is connected to
another port prior to a connection. Ports are stored in the order they are
added, getAll()
and iterator()
methods maintain this order.
Constructor Summary | |
---|---|
PortList()
Construct a port list. |
Method Summary | |
---|---|
protected void |
_add(Port port)
Adds a port to this list. |
protected void |
_remove(Port port)
Removes a port form the port list. |
void |
disconnectAll()
Disconnects all port connections with the super-hierarchy. |
Port |
get(mocgraph.Node node)
Returns the port related to the given node or one of its ports. |
Port |
get(java.lang.String name)
Returns the port defined with the given name. |
java.util.List |
getAll()
Returns a list of all ports in the order they are added. |
Port[] |
getConnectedPort(mocgraph.Edge edge)
Returns the port(s) that this edge is connected. |
boolean |
isConnected(mocgraph.Edge edge)
Checks if an edge is already connected to a port in this list. |
boolean |
isDefined(java.lang.String name)
Checks if a port name is previously defined. |
java.util.ListIterator |
iterator()
Returns an iterator over the list of port added. |
java.lang.String |
newName()
Returns a string that is guaranteed to be unused in this port list as a port name. |
java.lang.String |
toString()
Returns the names of the ports listed in this list in the order they are added. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PortList()
Method Detail |
---|
public void disconnectAll()
public Port get(java.lang.String name)
name
- Name of the port that is being searched.
public Port get(mocgraph.Node node)
node
- Node that is being searched.
public java.util.List getAll()
public Port[] getConnectedPort(mocgraph.Edge edge)
edge
- A graph edge.
public boolean isConnected(mocgraph.Edge edge)
public boolean isDefined(java.lang.String name)
public java.util.ListIterator iterator()
public java.lang.String newName()
public java.lang.String toString()
toString
in class java.lang.Object
protected void _add(Port port)
isDefined
and isConnected
methods can
be used to perform most of these checks.
protected void _remove(Port port)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |