@CleanupObligation public interface CloseableIterator<T> extends Iterator<T>, Closeable
Modifier and Type | Method and Description |
---|---|
void |
close() |
static <T> CloseableIterator<T> |
from(Iterator<T> it) |
static <T> CloseableIterator<T> |
from(Iterator<T> it,
AutoCloseable close) |
default Stream<T> |
toStreamRemaining() |
default Stream<T> |
toStreamRemaining(boolean parallel) |
forEachRemaining, hasNext, next, remove
@DischargesObligation void close()
close
in interface AutoCloseable
close
in interface Closeable
static <T> CloseableIterator<T> from(Iterator<T> it)
static <T> CloseableIterator<T> from(Iterator<T> it, AutoCloseable close)
Copyright © 2021 SPF4J. All rights reserved.