Lines Matching defs:Sink

37  * {@code Sink} for the first time, you must first call the {@code begin()}
41 * {@code accept()} without again calling {@code begin()}. {@code Sink} also
45 * {@code Sink}.
71 * <p>A {@code Sink} instance is used to represent each stage of this pipeline,
72 * whether the stage accepts objects, ints, longs, or doubles. Sink has entry
76 * point to the pipeline is the {@code Sink} for the filtering stage, which
77 * sends some elements "downstream" -- into the {@code Sink} for the mapping
78 * stage, which in turn sends integral values downstream into the {@code Sink}
79 * for the reduction stage. The {@code Sink} implementations associated with a
81 * the correct {@code accept} method on its downstream {@code Sink}. Similarly,
85 * <p>The specialized subtypes such as {@link Sink.OfInt} override
92 * {@code Sink.OfInt}, but also maintain a {@code downstream} field which
93 * represents the downstream {@code Sink}, and implement the methods
95 * delegate to the downstream {@code Sink}. Most implementations of
100 * IntSink is = new Sink.ChainedReference<U>(sink) {
107 * <p>Here, we implement {@code Sink.ChainedReference<U>}, meaning that we expect
112 * {@code int} and passes the resulting value to the downstream {@code Sink}.
117 interface Sink<T> extends Consumer<T> {
131 * Indicates that all elements have been pushed. If the {@code Sink} is
141 * Indicates that this {@code Sink} does not wish to receive any more data.
185 * {@code Sink} that implements {@code Sink<Integer>}, re-abstracts
189 interface OfInt extends Sink<Integer>, IntConsumer {
196 Tripwire.trip(getClass(), "{0} calling Sink.OfInt.accept(Integer)");
202 * {@code Sink} that implements {@code Sink<Long>}, re-abstracts
206 interface OfLong extends Sink<Long>, LongConsumer {
213 Tripwire.trip(getClass(), "{0} calling Sink.OfLong.accept(Long)");
219 * {@code Sink} that implements {@code Sink<Double>}, re-abstracts
223 interface OfDouble extends Sink<Double>, DoubleConsumer {
230 Tripwire.trip(getClass(), "{0} calling Sink.OfDouble.accept(Double)");
236 * Abstract {@code Sink} implementation for creating chains of
239 * downstream {@code Sink}. This implementation takes a downstream
240 * {@code Sink} of unknown input shape and produces a {@code Sink<T>}. The
242 * {@code accept()} method on the downstream {@code Sink}.
244 abstract static class ChainedReference<T, E_OUT> implements Sink<T> {
245 protected final Sink<? super E_OUT> downstream;
247 public ChainedReference(Sink<? super E_OUT> downstream) {
268 * Abstract {@code Sink} implementation designed for creating chains of
271 * downstream {@code Sink}. This implementation takes a downstream
272 * {@code Sink} of unknown input shape and produces a {@code Sink.OfInt}.
274 * {@code accept()} method on the downstream {@code Sink}.
276 abstract static class ChainedInt<E_OUT> implements Sink.OfInt {
277 protected final Sink<? super E_OUT> downstream;
279 public ChainedInt(Sink<? super E_OUT> downstream) {
300 * Abstract {@code Sink} implementation designed for creating chains of
303 * downstream {@code Sink}. This implementation takes a downstream
304 * {@code Sink} of unknown input shape and produces a {@code Sink.OfLong}.
306 * {@code accept()} method on the downstream {@code Sink}.
308 abstract static class ChainedLong<E_OUT> implements Sink.OfLong {
309 protected final Sink<? super E_OUT> downstream;
311 public ChainedLong(Sink<? super E_OUT> downstream) {
332 * Abstract {@code Sink} implementation designed for creating chains of
335 * downstream {@code Sink}. This implementation takes a downstream
336 * {@code Sink} of unknown input shape and produces a {@code Sink.OfDouble}.
338 * {@code accept()} method on the downstream {@code Sink}.
340 abstract static class ChainedDouble<E_OUT> implements Sink.OfDouble {
341 protected final Sink<? super E_OUT> downstream;
343 public ChainedDouble(Sink<? super E_OUT> downstream) {