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.Object
public java.lang.Object clone()
clone
in class java.lang.Object
public void goLast()
goLast
in interface JdapiIterator
public void goStart()
goStart
in interface JdapiIterator
public boolean hasNext()
hasNext
in interface java.util.Iterator
hasNext
in interface JdapiIterator
public boolean hasPrevious()
hasPrevious
in interface JdapiIterator
public java.lang.Object next()
next
in interface java.util.Iterator
next
in interface JdapiIterator
public java.lang.Object previous()
previous
in interface JdapiIterator
public 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.Iterator
remove
in interface JdapiIterator
JdapiException