|
Nodenet Problem Set Javadocs | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object nodenet.InputChannelVector
InputChannelVector is something which acts like a Vector
of InputChannel
s instead of Objects.
The methods of this class were previously synchronized, but Sun's Vector class uses synchronized methods. Since our only data field is the already synchronized Vector, locking on this object is redundant.
Constructor Summary | |
InputChannelVector(Node owner)
Constructs a new InputChannelVector. |
Method Summary | |
void |
addElement(InputChannel obj)
Adds an object to the InputChannelVector. |
boolean |
contains(java.lang.Object elem)
Checks to see if it contains an element. |
InputChannel |
elementAt(int index)
Returns the InputChannel at a certain index. |
java.util.Enumeration |
elements()
Transforms InputChannelVector into yet another type of collection of objects, called an Enumeration. |
InputChannel |
firstElement()
Returns the first InputChannel in the InputChannelVector. |
Node |
getOwner()
Find out who the owner of this object is. |
boolean |
isEmpty()
Returns true if the InputChannelVector is empty. |
InputChannel |
lastElement()
Returns the last InputChannel in the InputChannelVector. |
void |
removeAllElements()
Removes all elements from the InputChannelVector. |
boolean |
removeElement(InputChannel obj)
Removes a specific element from the InputChannelVector. |
int |
size()
Returns the size of the InputChannelVector. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public InputChannelVector(Node owner)
Method Detail |
public Node getOwner()
Node
public final void addElement(InputChannel obj)
public final boolean contains(java.lang.Object elem)
public final InputChannel elementAt(int index)
index
- index of the InputChannel being looked uppublic final java.util.Enumeration elements()
public final InputChannel firstElement()
public final boolean isEmpty()
public final InputChannel lastElement()
public final void removeAllElements()
public final boolean removeElement(InputChannel obj)
obj
- the object being removedpublic final int size()
|
Nodenet Problem Set Javadocs | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |