|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A Port belongs to a Cell or is free. A free Port is used as interface/support of an interaction net.
A Port is either connected to another Port or disconnected.
Method Summary | |
void |
connectTo(Port port)
Connects this Port to another Port. |
void |
disconnect()
Disconnects this Port. |
Cell |
getCell()
Returns the Cell to which this port belongs to or null if this Port is free. |
Port |
getConnectedPort()
Returns the Port to which this one is connected or null if it is not connected. |
int |
getPortNumber()
Returns the number of this port. |
boolean |
isConnected()
Returns true if this Port is connected, false elsewhere. |
boolean |
isFree()
Returns true if this Port is free, i.e. if it doesn't belong to a Cell. |
boolean |
isPrincipal()
Returns true if this Port is principal, false elsewhere. |
Method Detail |
public Cell getCell()
public boolean isFree()
public int getPortNumber()
public boolean isPrincipal()
public Port getConnectedPort()
public boolean isConnected()
public void connectTo(Port port)
port
- another Port.
java.lang.IllegalArgumentException
- if the given argument is itself.
java.lang.NullPointerException
- if the given argument is null.public void disconnect()
Post-condition: connectedPort == null.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |