Lines Matching defs:downstream

384      * multi-level reduction, such as downstream of a {@code groupingBy} or
396 * @param <U> type of elements accepted by downstream collector
397 * @param <A> intermediate accumulation type of the downstream collector
400 * @param downstream a collector which will accept mapped values
402 * elements and provides the mapped results to the downstream collector
406 Collector<? super U, A, R> downstream) {
407 BiConsumer<A, ? super U> downstreamAccumulator = downstream.accumulator();
408 return new CollectorImpl<>(downstream.supplier(),
410 downstream.combiner(), downstream.finisher(),
411 downstream.characteristics());
419 * output elements that are then accumulated downstream. Each mapped stream
421 * have been placed downstream. (If a mapped stream is {@code null}
426 * multi-level reduction, such as downstream of a {@code groupingBy} or
438 * @param <U> type of elements accepted by downstream collector
439 * @param <A> intermediate accumulation type of the downstream collector
443 * @param downstream a collector which will receive the elements of the
446 * elements and provides the flat mapped results to the downstream collector
451 Collector<? super U, A, R> downstream) {
452 BiConsumer<A, ? super U> downstreamAccumulator = downstream.accumulator();
453 return new CollectorImpl<>(downstream.supplier(),
460 downstream.combiner(), downstream.finisher(),
461 downstream.characteristics());
471 * multi-level reduction, such as downstream of a {@code groupingBy} or
490 * @param <A> intermediate accumulation type of the downstream collector
493 * @param downstream a collector which will accept values that match the
496 * and provides matching elements to the downstream collector
501 Collector<? super T, A, R> downstream) {
502 BiConsumer<A, ? super T> downstreamAccumulator = downstream.accumulator();
503 return new CollectorImpl<>(downstream.supplier(),
509 downstream.combiner(), downstream.finisher(),
510 downstream.characteristics());
524 * @param <A> intermediate accumulation type of the downstream collector
525 * @param <R> result type of the downstream collector
527 * @param downstream a collector
528 * @param finisher a function to be applied to the final result of the downstream collector
529 * @return a collector which performs the action of the downstream collector,
532 public static<T,A,R,RR> Collector<T,A,RR> collectingAndThen(Collector<T,A,R> downstream,
534 Set<Collector.Characteristics> characteristics = downstream.characteristics();
544 return new CollectorImpl<>(downstream.supplier(),
545 downstream.accumulator(),
546 downstream.combiner(),
547 downstream.finisher().andThen(finisher),
801 * multi-level reduction, downstream of {@code groupingBy} or
836 * multi-level reduction, downstream of {@code groupingBy} or
890 * multi-level reduction, downstream of {@code groupingBy} or
975 * the values associated with a given key using the specified downstream
979 * The downstream collector operates on elements of type {@code T} and
999 * preservation of the order in which elements are presented to the downstream
1005 * @param <A> the intermediate accumulation type of the downstream collector
1006 * @param <D> the result type of the downstream reduction
1008 * @param downstream a {@code Collector} implementing the downstream reduction
1017 Collector<? super T, A, D> downstream) {
1018 return groupingBy(classifier, HashMap::new, downstream);
1025 * the values associated with a given key using the specified downstream
1030 * The downstream collector operates on elements of type {@code T} and
1049 * preservation of the order in which elements are presented to the downstream
1055 * @param <A> the intermediate accumulation type of the downstream collector
1056 * @param <D> the result type of the downstream reduction
1059 * @param downstream a {@code Collector} implementing the downstream reduction
1071 Collector<? super T, A, D> downstream) {
1072 Supplier<A> downstreamSupplier = downstream.supplier();
1073 BiConsumer<A, ? super T> downstreamAccumulator = downstream.accumulator();
1079 BinaryOperator<Map<K, A>> merger = Collectors.<K, A, Map<K, A>>mapMerger(downstream.combiner());
1083 if (downstream.characteristics().contains(Collector.Characteristics.IDENTITY_FINISH)) {
1088 Function<A, A> downstreamFinisher = (Function<A, A>) downstream.finisher();
1143 * downstream {@code Collector}.
1149 * The downstream collector operates on elements of type {@code T} and
1168 * @param <A> the intermediate accumulation type of the downstream collector
1169 * @param <D> the result type of the downstream reduction
1171 * @param downstream a {@code Collector} implementing the downstream reduction
1180 Collector<? super T, A, D> downstream) {
1181 return groupingByConcurrent(classifier, ConcurrentHashMap::new, downstream);
1189 * downstream {@code Collector}. The {@code ConcurrentMap} produced by the
1196 * The downstream collector operates on elements of type {@code T} and
1213 * @param <A> the intermediate accumulation type of the downstream collector
1214 * @param <D> the result type of the downstream reduction
1217 * @param downstream a {@code Collector} implementing the downstream reduction
1229 Collector<? super T, A, D> downstream) {
1230 Supplier<A> downstreamSupplier = downstream.supplier();
1231 BiConsumer<A, ? super T> downstreamAccumulator = downstream.accumulator();
1232 BinaryOperator<ConcurrentMap<K, A>> merger = Collectors.<K, A, ConcurrentMap<K, A>>mapMerger(downstream.combiner());
1236 if (downstream.characteristics().contains(Collector.Characteristics.CONCURRENT)) {
1253 if (downstream.characteristics().contains(Collector.Characteristics.IDENTITY_FINISH)) {
1258 Function<A, A> downstreamFinisher = (Function<A, A>) downstream.finisher();
1299 * {@code Map<Boolean, D>} whose values are the result of the downstream
1310 * obtained by calling the downstream collector's supplier function and then
1314 * @param <A> the intermediate accumulation type of the downstream collector
1315 * @param <D> the result type of the downstream reduction
1317 * @param downstream a {@code Collector} implementing the downstream
1326 Collector<? super T, A, D> downstream) {
1327 BiConsumer<A, ? super T> downstreamAccumulator = downstream.accumulator();
1330 BinaryOperator<A> op = downstream.combiner();
1335 new Partition<>(downstream.supplier().get(),
1336 downstream.supplier().get());
1337 if (downstream.characteristics().contains(Collector.Characteristics.IDENTITY_FINISH)) {
1342 new Partition<>(downstream.finisher().apply(par.forTrue),
1343 downstream.finisher().apply(par.forFalse));