Class AbstractThrowingIterator<T,X extends Exception>

java.lang.Object
org.n52.janmayen.AbstractThrowingIterator<T,X>
Type Parameters:
T - the element type
X - the exception type
All Implemented Interfaces:
ThrowingIterator<T,X>

public abstract class AbstractThrowingIterator<T,X extends Exception> extends Object implements ThrowingIterator<T,X>
Copy of AbstractIterator for ThrowingIterator.
  • Constructor Details

    • AbstractThrowingIterator

      public AbstractThrowingIterator()
  • Method Details

    • computeNext

      protected abstract T computeNext() throws X
      Throws:
      X
    • endOfData

      protected T endOfData()
    • next

      public T next() throws X
      Description copied from interface: ThrowingIterator
      Returns the next element in the iteration.
      Specified by:
      next in interface ThrowingIterator<T,X extends Exception>
      Returns:
      the next element in the iteration
      Throws:
      X
      See Also:
    • hasNext

      public boolean hasNext() throws X
      Description copied from interface: ThrowingIterator
      Returns true if the iteration has more elements. (In other words, returns true if ThrowingIterator.next() would return an element rather than throwing an exception.)
      Specified by:
      hasNext in interface ThrowingIterator<T,X extends Exception>
      Returns:
      true if the iteration has more elements
      Throws:
      X
      See Also: