|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Stack of Port. As a ConnectionListener, it keeps only the trace of principal, non beta, connections.
| Method Summary | |
void |
clear()
Clear the content of this stack. |
boolean |
contains(Port port)
Returns true if this stack contains the given Port. |
Port |
get(int index)
Return the Port at a given root relative index in the stack. |
int |
getSize()
Returns the size of the stack. |
boolean |
isEmpty()
Returns true if the stack is empty. |
Port |
pop()
Return the Port at the top and pop the stack. |
void |
push(Port port)
Push a Port on the top of the stack. |
boolean |
remove(Port port)
Removes a Port from this stack. |
void |
replace(int index,
Port port)
Replace the Port at a given root relative index in the stack. |
void |
returnToFactory()
Return this PortStack to the Factory. |
Port |
top()
Return the Port at the top or null is the stack is empty. |
| Methods inherited from interface org.xmloperator.lambda.net.model.ConnectionListener |
notifyConnection |
| Method Detail |
public void returnToFactory()
Post-condition: this is no more usable.
public int getSize()
public boolean isEmpty()
public void clear()
public void push(Port port)
port - a Port to push.
java.lang.IllegalArgumentException - if the given Port is null.public Port pop()
java.lang.IllegalStateException - if this stack is empty.public Port top()
public Port get(int index)
index - an index in the stack, between 0 and size - 1.
java.lang.IndexOutOfBoundsException - if index < 0 or index >= size.
public void replace(int index,
Port port)
index - an index in the stack, between 0 and size - 1.port - a Port for replacing the Port actually at the given index.
java.lang.IndexOutOfBoundsException - if index < 0 or index >= size.public boolean contains(Port port)
port - a Port.
public boolean remove(Port port)
port - a Port.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||