public class IteratorAdapter<T> extends java.lang.Object implements CloseableIterator<T>
| Modifier and Type | Field and Description |
|---|---|
private java.io.Closeable |
closeable |
private java.util.Iterator<T> |
iter |
| Constructor and Description |
|---|
IteratorAdapter(java.util.Iterator<T> iter) |
IteratorAdapter(java.util.Iterator<T> iter,
java.io.Closeable closeable) |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<T> |
asList() |
static <T> java.util.List<T> |
asList(java.util.Iterator<T> iter) |
void |
close()
Closes this iterator and releases any system resources associated
with it.
|
boolean |
hasNext() |
T |
next() |
void |
remove() |
private final java.util.Iterator<T> iter
private final java.io.Closeable closeable
public IteratorAdapter(java.util.Iterator<T> iter)
public IteratorAdapter(java.util.Iterator<T> iter, java.io.Closeable closeable)
public static <T> java.util.List<T> asList(java.util.Iterator<T> iter)
public java.util.List<T> asList()
public void close()
CloseableIteratorclose in interface CloseableIterator<T>close in interface java.io.Closeableclose in interface java.lang.AutoCloseablepublic boolean hasNext()
hasNext in interface java.util.Iterator<T>public void remove()
remove in interface java.util.Iterator<T>