jdk/src/java.base/share/classes/java/util/stream/Sink.java
changeset 32649 2ee9017c7597
parent 25859 3317bb8137f4
equal deleted inserted replaced
32648:1fa861caf840 32649:2ee9017c7597
   239      * downstream {@code Sink}.  This implementation takes a downstream
   239      * downstream {@code Sink}.  This implementation takes a downstream
   240      * {@code Sink} of unknown input shape and produces a {@code Sink<T>}.  The
   240      * {@code Sink} of unknown input shape and produces a {@code Sink<T>}.  The
   241      * implementation of the {@code accept()} method must call the correct
   241      * implementation of the {@code accept()} method must call the correct
   242      * {@code accept()} method on the downstream {@code Sink}.
   242      * {@code accept()} method on the downstream {@code Sink}.
   243      */
   243      */
   244     static abstract class ChainedReference<T, E_OUT> implements Sink<T> {
   244     abstract static class ChainedReference<T, E_OUT> implements Sink<T> {
   245         protected final Sink<? super E_OUT> downstream;
   245         protected final Sink<? super E_OUT> downstream;
   246 
   246 
   247         public ChainedReference(Sink<? super E_OUT> downstream) {
   247         public ChainedReference(Sink<? super E_OUT> downstream) {
   248             this.downstream = Objects.requireNonNull(downstream);
   248             this.downstream = Objects.requireNonNull(downstream);
   249         }
   249         }
   271      * downstream {@code Sink}.  This implementation takes a downstream
   271      * downstream {@code Sink}.  This implementation takes a downstream
   272      * {@code Sink} of unknown input shape and produces a {@code Sink.OfInt}.
   272      * {@code Sink} of unknown input shape and produces a {@code Sink.OfInt}.
   273      * The implementation of the {@code accept()} method must call the correct
   273      * The implementation of the {@code accept()} method must call the correct
   274      * {@code accept()} method on the downstream {@code Sink}.
   274      * {@code accept()} method on the downstream {@code Sink}.
   275      */
   275      */
   276     static abstract class ChainedInt<E_OUT> implements Sink.OfInt {
   276     abstract static class ChainedInt<E_OUT> implements Sink.OfInt {
   277         protected final Sink<? super E_OUT> downstream;
   277         protected final Sink<? super E_OUT> downstream;
   278 
   278 
   279         public ChainedInt(Sink<? super E_OUT> downstream) {
   279         public ChainedInt(Sink<? super E_OUT> downstream) {
   280             this.downstream = Objects.requireNonNull(downstream);
   280             this.downstream = Objects.requireNonNull(downstream);
   281         }
   281         }
   303      * downstream {@code Sink}.  This implementation takes a downstream
   303      * downstream {@code Sink}.  This implementation takes a downstream
   304      * {@code Sink} of unknown input shape and produces a {@code Sink.OfLong}.
   304      * {@code Sink} of unknown input shape and produces a {@code Sink.OfLong}.
   305      * The implementation of the {@code accept()} method must call the correct
   305      * The implementation of the {@code accept()} method must call the correct
   306      * {@code accept()} method on the downstream {@code Sink}.
   306      * {@code accept()} method on the downstream {@code Sink}.
   307      */
   307      */
   308     static abstract class ChainedLong<E_OUT> implements Sink.OfLong {
   308     abstract static class ChainedLong<E_OUT> implements Sink.OfLong {
   309         protected final Sink<? super E_OUT> downstream;
   309         protected final Sink<? super E_OUT> downstream;
   310 
   310 
   311         public ChainedLong(Sink<? super E_OUT> downstream) {
   311         public ChainedLong(Sink<? super E_OUT> downstream) {
   312             this.downstream = Objects.requireNonNull(downstream);
   312             this.downstream = Objects.requireNonNull(downstream);
   313         }
   313         }
   335      * downstream {@code Sink}.  This implementation takes a downstream
   335      * downstream {@code Sink}.  This implementation takes a downstream
   336      * {@code Sink} of unknown input shape and produces a {@code Sink.OfDouble}.
   336      * {@code Sink} of unknown input shape and produces a {@code Sink.OfDouble}.
   337      * The implementation of the {@code accept()} method must call the correct
   337      * The implementation of the {@code accept()} method must call the correct
   338      * {@code accept()} method on the downstream {@code Sink}.
   338      * {@code accept()} method on the downstream {@code Sink}.
   339      */
   339      */
   340     static abstract class ChainedDouble<E_OUT> implements Sink.OfDouble {
   340     abstract static class ChainedDouble<E_OUT> implements Sink.OfDouble {
   341         protected final Sink<? super E_OUT> downstream;
   341         protected final Sink<? super E_OUT> downstream;
   342 
   342 
   343         public ChainedDouble(Sink<? super E_OUT> downstream) {
   343         public ChainedDouble(Sink<? super E_OUT> downstream) {
   344             this.downstream = Objects.requireNonNull(downstream);
   344             this.downstream = Objects.requireNonNull(downstream);
   345         }
   345         }