CloseableIterator<Object>, Closeable, AutoCloseable, Iterator<Object>SamPairUtil.SetMateInfoIteratorpublic class PeekableIterator<Object> extends Object implements CloseableIterator<Object>
| Constructor | Description |
|---|---|
PeekableIterator(Iterator<Object> iterator) |
Constructs a new iterator that wraps the supplied iterator.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
Closes the underlying iterator.
|
boolean |
hasNext() |
True if there are more items, in which case both next() and peek() will return a value.
|
Object |
next() |
Returns the next object and advances the iterator.
|
Object |
peek() |
Returns the next object but does not advance the iterator.
|
void |
remove() |
Unsupported Operation.
|
stream, toListforEachRemainingpublic void close()
close in interface AutoCloseableclose in interface Closeableclose in interface CloseableIterator<Object>public boolean hasNext()
public Object next()
public Object peek()