public abstract static class Sink.ChainedDouble<E_OUT> extends Object implements Sink.OfDouble
Sink
implementation designed for creating chains of
sinks. The begin
, end
, and
cancellationRequested
methods are wired to chain to the
downstream Sink
. This implementation takes a downstream
Sink
of unknown input shape and produces a Sink.OfDouble
.
The implementation of the accept()
method must call the correct
accept()
method on the downstream Sink
.Sink.ChainedDouble<E_OUT>, Sink.ChainedInt<E_OUT>, Sink.ChainedLong<E_OUT>, Sink.ChainedReference<T,E_OUT>, Sink.OfDouble, Sink.OfInt, Sink.OfLong
Modifier and Type | Field and Description |
---|---|
protected Sink<? super E_OUT> |
downstream |
Constructor and Description |
---|
ChainedDouble(Sink<? super E_OUT> downstream) |
Modifier and Type | Method and Description |
---|---|
void |
begin(long size)
Resets the sink state to receive a fresh data set.
|
boolean |
cancellationRequested()
Indicates that this
Sink does not wish to receive any more data. |
void |
end()
Indicates that all elements have been pushed.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
accept, accept
andThen
public void begin(long size)
Sink
Sink.end()
,
you may call this method to reset the sink for another calculation.public void end()
Sink
Sink
is
stateful, it should send any stored state downstream at this time, and
should clear any accumulated state (and associated resources).
Prior to this call, the sink must be in the active state, and after this call it is returned to the initial state.
public boolean cancellationRequested()
Sink
Sink
does not wish to receive any more data.cancellationRequested
in interface Sink<Double>