|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.molae.pipe.correct.CorrectIterator<E>
public class CorrectIterator<E>
Wrapper class to receive the correct exceptions from iterators.
Constructor Summary | |
---|---|
CorrectIterator(Iterator<? extends E> base)
Constructs a new exception safe iterator wrapper. |
Method Summary | |
---|---|
Iterator<? extends E> |
getIterator()
Deprecated. leftover from org.apache.commons.collections.iterators.ProxyIterator |
boolean |
hasNext()
|
E |
next()
|
void |
remove()
Calls the corresponding method of the base iterator and maps NoSuchElementException to
IllegalStateException . |
void |
setIterator(Iterator<? extends E> iterator)
Deprecated. leftover from org.apache.commons.collections.iterators.ProxyIterator |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CorrectIterator(Iterator<? extends E> base)
base
- the underlying iterator
NullPointerException
- if the specified object is
null
.Method Detail |
---|
public Iterator<? extends E> getIterator()
org.apache.commons.collections.iterators.ProxyIterator
public void setIterator(Iterator<? extends E> iterator)
org.apache.commons.collections.iterators.ProxyIterator
iterator
- New value of property iterator.public boolean hasNext()
hasNext
in interface Iterator<E>
public E next()
next
in interface Iterator<E>
public void remove()
NoSuchElementException
to
IllegalStateException
.
remove
in interface Iterator<E>
UnsupportedOperationException
- depending on the base iterator
IllegalStateException
- if the base iterator has thrown a
IllegalStateException
or
NoSuchElementException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |