public class ElementIterator<E>
extends java.lang.Object
implements java.util.Iterator<E>
| Constructor and Description |
|---|
ElementIterator(PositionList<E> L)
Creates an element iterator over the given list.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext()
Returns whether the iterator has a next object.
|
E |
next()
Returns the next object in the iterator.
|
void |
remove()
Throws an
UnsupportedOperationException in all cases,
because removal is not a supported operation in this iterator. |
public ElementIterator(PositionList<E> L)
public boolean hasNext()
hasNext in interface java.util.Iterator<E>public E next() throws java.util.NoSuchElementException
next in interface java.util.Iterator<E>java.util.NoSuchElementExceptionpublic void remove()
throws java.lang.UnsupportedOperationException
UnsupportedOperationException in all cases,
because removal is not a supported operation in this iterator.remove in interface java.util.Iterator<E>java.lang.UnsupportedOperationException