Package org.n52.janmayen
Class AbstractThrowingIterator<T,X extends Exception>
- java.lang.Object
-
- org.n52.janmayen.AbstractThrowingIterator<T,X>
-
- Type Parameters:
T- the element typeX- the exception type
- All Implemented Interfaces:
ThrowingIterator<T,X>
public abstract class AbstractThrowingIterator<T,X extends Exception> extends Object implements ThrowingIterator<T,X>
Copy ofAbstractIteratorforThrowingIterator.
-
-
Constructor Summary
Constructors Constructor Description AbstractThrowingIterator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract TcomputeNext()protected TendOfData()booleanhasNext()Returnstrueif the iteration has more elements.Tnext()Returns the next element in the iteration.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.n52.janmayen.ThrowingIterator
forEachRemaining, remove
-
-
-
-
Method Detail
-
endOfData
protected T endOfData()
-
next
public T next() throws X extends Exception
Description copied from interface:ThrowingIteratorReturns the next element in the iteration.- Specified by:
nextin interfaceThrowingIterator<T,X extends Exception>- Returns:
- the next element in the iteration
- Throws:
X- if the next element could not be acquiredX extends Exception- See Also:
Iterator.next()
-
hasNext
public boolean hasNext() throws X extends ExceptionDescription copied from interface:ThrowingIteratorReturnstrueif the iteration has more elements. (In other words, returnstrueifThrowingIterator.next()would return an element rather than throwing an exception.)- Specified by:
hasNextin interfaceThrowingIterator<T,X extends Exception>- Returns:
trueif the iteration has more elements- Throws:
X- if the check for the next value failsX extends Exception- See Also:
Iterator.hasNext()
-
-