|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.data.streams.adapters.IteratorStream<E>
E - the type of stream elementspublic class IteratorStream<E>
A Stream adapter for Iterators.
| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
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()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IteratorStream(IteratorAdapter<E> adapter)
IteratorAdapter.
adapter - the adapterpublic IteratorStream(Iterator<E> iterator)
Iterator with a default IteratorAdapter.
iterator - the iterator| Method Detail |
|---|
public boolean hasNext()
hasNext in interface Iterator<E>hasNext in interface Stream<E>public E next()
next in interface Iterator<E>next in interface Stream<E>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.
close in interface Stream<E>public URI locator()
Stream
locator in interface Stream<E>public void remove()
remove in interface Iterator<E>public boolean isClosed()
Streamtrue if the stream has been closed.
isClosed in interface Stream<E>true if the stream has been closed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||