|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.elkoserver.util.EmptyIterator<V>
public class EmptyIterator<V>
Iterator for a collection of no elements. This is sort of the Iterator equivalent of a null pointer.
| Constructor Summary | |
|---|---|
EmptyIterator()
Constructor. |
|
| Method Summary | |
|---|---|
boolean |
hasNext()
Returns true if the iteration has more elements. |
V |
next()
Returns the next element in the iteration. |
void |
remove()
Removes from the underlying collection the last element returned by the iterator; will always throw an exception since there never was such an element. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EmptyIterator()
| Method Detail |
|---|
public boolean hasNext()
hasNext in interface Iterator<V>public V next()
next in interface Iterator<V>NoSuchElementException - iteration has no more elements (always).public void remove()
remove in interface Iterator<V>IllegalStateException - since there are no elements in this
collection.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||