class JdapiModuleListIterator extends java.lang.Object implements JdapiIterator
| Constructor and Description |
|---|
JdapiModuleListIterator(JdapiModuleListIterator other)
Copy constructor.
|
JdapiModuleListIterator(java.util.Vector list)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone()
Creates a copy of the iterator at the current position.
|
void |
goLast()
Moves the iterator to the end of the list.
|
void |
goStart()
Moves the iterator to the start of the list.
|
boolean |
hasNext()
Returns true if the iteration has more elements (JDK1.2 iterator
style).
|
boolean |
hasPrevious()
Returns true if the iteration has previous elements (JDK1.2 list
iterator style).
|
java.lang.Object |
next()
Gets the next object (JDK1.2 iterator style).
|
java.lang.Object |
previous()
Gets the previous object (JDK1.2 list iterator style).
|
void |
remove()
Removes the current object from the iteration.
|
java.lang.String |
toString()
Get a string representation of the current state of the object.
|
public JdapiModuleListIterator(java.util.Vector list)
list - List of modulespublic JdapiModuleListIterator(JdapiModuleListIterator other)
other - Iterator to copypublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.Object clone()
clone in class java.lang.Objectpublic void goLast()
goLast in interface JdapiIteratorpublic void goStart()
goStart in interface JdapiIteratorpublic boolean hasNext()
hasNext in interface java.util.IteratorhasNext in interface JdapiIteratorpublic boolean hasPrevious()
hasPrevious in interface JdapiIteratorpublic java.lang.Object next()
next in interface java.util.Iteratornext in interface JdapiIteratorpublic java.lang.Object previous()
previous in interface JdapiIteratorpublic void remove()
throws JdapiException
If the iterator is not positioned at the first element of the list, it will position itself there before doing the remove. This allows you to write code like:
while(iter.hasNext()) {
iter.remove();
}
remove in interface java.util.Iteratorremove in interface JdapiIteratorJdapiException