public interface CloseableIterator<T> extends Iterator<T>, Closeable
Iterator that implements Closeable which allows a Graph implementation
that hold open resources to provide the user the option to release those resources.| Modifier and Type | Interface and Description |
|---|---|
static class |
CloseableIterator.EmptyCloseableIterator<T> |
| Modifier and Type | Method and Description |
|---|---|
default void |
close() |
static <T> void |
closeIterator(Iterator<T> iterator) |
static <T> CloseableIterator<T> |
empty() |
static <T> CloseableIterator<T> |
of(Iterator<T> iterator)
Wraps an existing
Iterator in a CloseableIterator. |
forEachRemaining, hasNext, next, removestatic <T> CloseableIterator<T> of(Iterator<T> iterator)
Iterator in a CloseableIterator. If the Iterator is already of that
type then it will simply be returned as-is.default void close()
close in interface AutoCloseableclose in interface Closeablestatic <T> void closeIterator(Iterator<T> iterator)
static <T> CloseableIterator<T> empty()
Copyright © 2013–2023 Apache Software Foundation. All rights reserved.