|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.data.streams.LookAheadStream<E2>
org.gcube.data.streams.delegates.PipedStream<E1,E2>
E1 - the type of elements of the input streamE2 - the type of stream elementspublic class PipedStream<E1,E2>
A Stream of elements generated by the elements of an input Stream
| Field Summary |
|---|
| Fields inherited from class org.gcube.data.streams.LookAheadStream |
|---|
element, hasNext |
| Constructor Summary | |
|---|---|
PipedStream(Stream<E1> stream,
Generator<E1,E2> generator)
Creates an instance with a Stream and an element Generator. |
|
| Method Summary | |
|---|---|
void |
close()
Closes the stream unconditionally, releasing any resources that it may be using. |
protected boolean |
delegateHasNext()
Returns true if the underlying stream has more elements. |
protected E2 |
delegateNext()
Returns an element of the underlying stream |
boolean |
isClosed()
Returns true if the stream has been closed. |
URI |
locator()
Returns the stream locator. |
void |
remove()
|
protected Stream<E1> |
stream()
Returns the underlying Stream. |
| Methods inherited from class org.gcube.data.streams.LookAheadStream |
|---|
hasNext, next, setHandler |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PipedStream(Stream<E1> stream,
Generator<E1,E2> generator)
throws IllegalArgumentException
Stream and an element Generator.
stream - the streamgenerator - the generator
IllegalArgumentException - if the stream or the generator are null| Method Detail |
|---|
protected E2 delegateNext()
LookAheadStream
delegateNext in class LookAheadStream<E2>protected boolean delegateHasNext()
LookAheadStreamtrue if the underlying stream has more elements.
delegateHasNext in class LookAheadStream<E2>true if the underlying stream has more elementsprotected Stream<E1> stream()
Stream.
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.
public URI locator()
throws IllegalStateException
Stream
IllegalStateException - if the stream is no longer addressable at the time of invocation.public void remove()
public boolean isClosed()
Streamtrue if the stream has been closed.
true if the stream has been closed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||