Class CloseableIterator<T>
java.lang.Object
org.apache.maven.surefire.api.util.CloseableIterator<T>
- Type Parameters:
T
- the type of elements returned by this iterator
- All Implemented Interfaces:
Iterator<T>
This iterator is marked as stopped if
isClosed()
returns true
.
If the iterator has been closed before calling hasNext()
then the method returns false
.
If the iterator was closed after hasNext returns true
but before next()
, the
method next()
throws NoSuchElementException
.
The method remove()
throws IllegalStateException
if the iterator has been closed.- Since:
- 2.19.1
- Author:
- Tibor Digana (tibor17)
-
Constructor Details
-
CloseableIterator
public CloseableIterator()
-
-
Method Details
-
isClosed
protected abstract boolean isClosed() -
doHasNext
protected abstract boolean doHasNext() -
doNext
-
doRemove
protected abstract void doRemove() -
hasNext
public boolean hasNext() -
next
-
remove
public void remove()
-