@InternalUseOnly public class CloseablePeakableIteration<E,X extends Exception> extends Object implements CloseableIteration<E,X>
Constructor and Description |
---|
CloseablePeakableIteration(CloseableIteration<E,X> parent) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this iteration, freeing any resources that it is holding.
|
boolean |
hasNext()
Returns true if the iteration has more elements.
|
E |
next()
Returns the next element in the iteration.
|
E |
peek() |
void |
remove()
Removes from the underlying collection the last element returned by the iteration (optional operation).
|
public CloseablePeakableIteration(CloseableIteration<E,X> parent)
public void close() throws X extends Exception
CloseableIteration
close
in interface AutoCloseable
close
in interface CloseableIteration<E,X extends Exception>
X extends Exception
public boolean hasNext() throws X extends Exception
Iteration
Iteration.next()
would return an element rather than throwing a NoSuchElementException.)public E next() throws X extends Exception
Iteration
public void remove() throws X extends Exception
Iteration
Copyright © 2015-2022 Eclipse Foundation. All Rights Reserved.