| Constructor and Description |
|---|
IteratorStream(Iterator<E> iterator)
Creates an instance that adapts a given
Iterator with a default IteratorAdapter. |
IteratorStream(IteratorAdapter<E> adapter)
Creates an instance that adapts a given
IteratorAdapter. |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the stream unconditionally, releasing any resources that it may be using.
|
boolean |
hasNext() |
boolean |
isClosed()
Returns
true if the stream has been closed. |
URI |
locator()
Returns the stream locator.
|
E |
next() |
void |
remove() |
public IteratorStream(IteratorAdapter<E> adapter)
IteratorAdapter.adapter - the adapterpublic IteratorStream(Iterator<E> iterator)
Iterator with a default IteratorAdapter.iterator - the iteratorpublic boolean hasNext()
public E next()
public void close()
Stream
Subsequent invocations of this method have no effect.
Subsequents invocations of Stream.hasNext() return false.
Subsequent invocations of Stream.next() throw NoSuchElementExceptions.
Failures are logged by implementations and suppressed otherwise.
Copyright © 2018. All Rights Reserved.