|
||||||||||
| 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 Iterator with a given IteratorAdapter. |
|
| Method Summary | |
|---|---|
void |
close()
Closes the stream unconditionally, releasing any resources that it may be using. |
boolean |
hasNext()
Returns true if the stream has more elements. |
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)
Iterator with a given IteratorAdapter.
iterator - the iteratoradapter - the adapterpublic IteratorStream(Iterator<E> iterator)
Iterator with a default IteratorAdapter.
iterator - the iterator| Method Detail |
|---|
public boolean hasNext()
Streamtrue if the stream has more elements.
hasNext in interface Iterator<E>hasNext in interface Stream<E>true if the stream has more elements and has not been closed.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 are otherwise suppressed.
close in interface Stream<E>public URI locator()
Stream
locator in interface Stream<E>public void remove()
remove in interface Iterator<E>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||