X extends Exception>
Method SummaryModifier and TypeMethodDescription
close()Closes this iteration, freeing any resources that it is holding.
hasNext()Returns true if the iteration has more elements.
next()Returns the next element in the iteration.
remove()Removes from the underlying collection the last element returned by the iteration (optional operation).
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
closepublic void close() throws XDescription copied from interface:
CloseableIterationCloses this iteration, freeing any resources that it is holding. If the iteration has already been closed then invoking this method has no effect.
hasNextpublic boolean hasNext() throws XReturns true if the iteration has more elements. (In other words, returns true if
Iteration.next()would return an element rather than throwing a NoSuchElementException.)
nextpublic E next() throws XReturns the next element in the iteration.
removepublic void remove() throws XRemoves from the underlying collection the last element returned by the iteration (optional operation). This method can be called only once per call to next.
peekpublic E peek() throws X