|
Nodenet Problem Set Javadocs | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object nodenet.OutputChannelVector
OutputChannelVector is something which acts like a Vector
of OutputChannel
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.
Copyright (c) 1998 Massachusetts Institute of Technology
Constructor Summary | |
OutputChannelVector(Node owner)
Constructs a new OutputChannelVector |
Method Summary | |
void |
addElement(OutputChannel obj)
Adds an object to the OutputChannelVector. |
boolean |
contains(java.lang.Object elem)
Checks to see if it contains an element. |
OutputChannel |
elementAt(int index)
Returns the OutputChannel at a certain index. |
java.util.Enumeration |
elements()
Transforms OutputChannelVector into yet another type of collection of objects, called an Enumeration. |
OutputChannel |
firstElement()
Returns the first OutputChannel in the OutputChannelVector. |
Node |
getOwner()
Find out who the owner of this object is. |
boolean |
isEmpty()
Returns true if the OutputChannelVector is empty. |
OutputChannel |
lastElement()
Returns the last OutputChannel in the OutputChannelVector. |
void |
removeAllElements()
Removes all elements from the OutputChannelVector. |
boolean |
removeElement(OutputChannel obj)
Removes a specific element from the OutputChannelVector. |
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 OutputChannelVector(Node owner)
Method Detail |
public Node getOwner()
Node
public final void addElement(OutputChannel obj)
public final boolean contains(java.lang.Object elem)
public final OutputChannel elementAt(int index)
index
- index of the OutputChannel being looked uppublic final java.util.Enumeration elements()
public final OutputChannel firstElement()
public final boolean isEmpty()
public final OutputChannel lastElement()
public final void removeAllElements()
public final boolean removeElement(OutputChannel 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 |