1 /*
2 * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package java.util.stream;
27
28 @SuppressWarnings({"unchecked", "deprecation", "all"})
29 public final class Collectors {
30
Collectors()31 Collectors() { throw new RuntimeException("Stub!"); }
32
toCollection(java.util.function.Supplier<C> collectionFactory)33 public static <T, C extends java.util.Collection<T>> java.util.stream.Collector<T,?,C> toCollection(java.util.function.Supplier<C> collectionFactory) { throw new RuntimeException("Stub!"); }
34
toList()35 public static <T> java.util.stream.Collector<T,?,java.util.List<T>> toList() { throw new RuntimeException("Stub!"); }
36
toUnmodifiableList()37 public static <T> java.util.stream.Collector<T,?,java.util.List<T>> toUnmodifiableList() { throw new RuntimeException("Stub!"); }
38
toSet()39 public static <T> java.util.stream.Collector<T,?,java.util.Set<T>> toSet() { throw new RuntimeException("Stub!"); }
40
toUnmodifiableSet()41 public static <T> java.util.stream.Collector<T,?,java.util.Set<T>> toUnmodifiableSet() { throw new RuntimeException("Stub!"); }
42
joining()43 public static java.util.stream.Collector<java.lang.CharSequence,?,java.lang.String> joining() { throw new RuntimeException("Stub!"); }
44
joining(java.lang.CharSequence delimiter)45 public static java.util.stream.Collector<java.lang.CharSequence,?,java.lang.String> joining(java.lang.CharSequence delimiter) { throw new RuntimeException("Stub!"); }
46
joining(java.lang.CharSequence delimiter, java.lang.CharSequence prefix, java.lang.CharSequence suffix)47 public static java.util.stream.Collector<java.lang.CharSequence,?,java.lang.String> joining(java.lang.CharSequence delimiter, java.lang.CharSequence prefix, java.lang.CharSequence suffix) { throw new RuntimeException("Stub!"); }
48
mapping(java.util.function.Function<? super T,? extends U> mapper, java.util.stream.Collector<? super U,A,R> downstream)49 public static <T, U, A, R> java.util.stream.Collector<T,?,R> mapping(java.util.function.Function<? super T,? extends U> mapper, java.util.stream.Collector<? super U,A,R> downstream) { throw new RuntimeException("Stub!"); }
50
flatMapping(java.util.function.Function<? super T,? extends java.util.stream.Stream<? extends U>> mapper, java.util.stream.Collector<? super U,A,R> downstream)51 public static <T, U, A, R> java.util.stream.Collector<T,?,R> flatMapping(java.util.function.Function<? super T,? extends java.util.stream.Stream<? extends U>> mapper, java.util.stream.Collector<? super U,A,R> downstream) { throw new RuntimeException("Stub!"); }
52
filtering(java.util.function.Predicate<? super T> predicate, java.util.stream.Collector<? super T,A,R> downstream)53 public static <T, A, R> java.util.stream.Collector<T,?,R> filtering(java.util.function.Predicate<? super T> predicate, java.util.stream.Collector<? super T,A,R> downstream) { throw new RuntimeException("Stub!"); }
54
collectingAndThen(java.util.stream.Collector<T,A,R> downstream, java.util.function.Function<R,RR> finisher)55 public static <T, A, R, RR> java.util.stream.Collector<T,A,RR> collectingAndThen(java.util.stream.Collector<T,A,R> downstream, java.util.function.Function<R,RR> finisher) { throw new RuntimeException("Stub!"); }
56
counting()57 public static <T> java.util.stream.Collector<T,?,java.lang.Long> counting() { throw new RuntimeException("Stub!"); }
58
minBy(java.util.Comparator<? super T> comparator)59 public static <T> java.util.stream.Collector<T,?,java.util.Optional<T>> minBy(java.util.Comparator<? super T> comparator) { throw new RuntimeException("Stub!"); }
60
maxBy(java.util.Comparator<? super T> comparator)61 public static <T> java.util.stream.Collector<T,?,java.util.Optional<T>> maxBy(java.util.Comparator<? super T> comparator) { throw new RuntimeException("Stub!"); }
62
summingInt(java.util.function.ToIntFunction<? super T> mapper)63 public static <T> java.util.stream.Collector<T,?,java.lang.Integer> summingInt(java.util.function.ToIntFunction<? super T> mapper) { throw new RuntimeException("Stub!"); }
64
summingLong(java.util.function.ToLongFunction<? super T> mapper)65 public static <T> java.util.stream.Collector<T,?,java.lang.Long> summingLong(java.util.function.ToLongFunction<? super T> mapper) { throw new RuntimeException("Stub!"); }
66
summingDouble(java.util.function.ToDoubleFunction<? super T> mapper)67 public static <T> java.util.stream.Collector<T,?,java.lang.Double> summingDouble(java.util.function.ToDoubleFunction<? super T> mapper) { throw new RuntimeException("Stub!"); }
68
averagingInt(java.util.function.ToIntFunction<? super T> mapper)69 public static <T> java.util.stream.Collector<T,?,java.lang.Double> averagingInt(java.util.function.ToIntFunction<? super T> mapper) { throw new RuntimeException("Stub!"); }
70
averagingLong(java.util.function.ToLongFunction<? super T> mapper)71 public static <T> java.util.stream.Collector<T,?,java.lang.Double> averagingLong(java.util.function.ToLongFunction<? super T> mapper) { throw new RuntimeException("Stub!"); }
72
averagingDouble(java.util.function.ToDoubleFunction<? super T> mapper)73 public static <T> java.util.stream.Collector<T,?,java.lang.Double> averagingDouble(java.util.function.ToDoubleFunction<? super T> mapper) { throw new RuntimeException("Stub!"); }
74
reducing(T identity, java.util.function.BinaryOperator<T> op)75 public static <T> java.util.stream.Collector<T,?,T> reducing(T identity, java.util.function.BinaryOperator<T> op) { throw new RuntimeException("Stub!"); }
76
reducing(java.util.function.BinaryOperator<T> op)77 public static <T> java.util.stream.Collector<T,?,java.util.Optional<T>> reducing(java.util.function.BinaryOperator<T> op) { throw new RuntimeException("Stub!"); }
78
reducing(U identity, java.util.function.Function<? super T,? extends U> mapper, java.util.function.BinaryOperator<U> op)79 public static <T, U> java.util.stream.Collector<T,?,U> reducing(U identity, java.util.function.Function<? super T,? extends U> mapper, java.util.function.BinaryOperator<U> op) { throw new RuntimeException("Stub!"); }
80
groupingBy(java.util.function.Function<? super T,? extends K> classifier)81 public static <T, K> java.util.stream.Collector<T,?,java.util.Map<K,java.util.List<T>>> groupingBy(java.util.function.Function<? super T,? extends K> classifier) { throw new RuntimeException("Stub!"); }
82
groupingBy(java.util.function.Function<? super T,? extends K> classifier, java.util.stream.Collector<? super T,A,D> downstream)83 public static <T, K, A, D> java.util.stream.Collector<T,?,java.util.Map<K,D>> groupingBy(java.util.function.Function<? super T,? extends K> classifier, java.util.stream.Collector<? super T,A,D> downstream) { throw new RuntimeException("Stub!"); }
84
groupingBy(java.util.function.Function<? super T,? extends K> classifier, java.util.function.Supplier<M> mapFactory, java.util.stream.Collector<? super T,A,D> downstream)85 public static <T, K, D, A, M extends java.util.Map<K, D>> java.util.stream.Collector<T,?,M> groupingBy(java.util.function.Function<? super T,? extends K> classifier, java.util.function.Supplier<M> mapFactory, java.util.stream.Collector<? super T,A,D> downstream) { throw new RuntimeException("Stub!"); }
86
groupingByConcurrent(java.util.function.Function<? super T,? extends K> classifier)87 public static <T, K> java.util.stream.Collector<T,?,java.util.concurrent.ConcurrentMap<K,java.util.List<T>>> groupingByConcurrent(java.util.function.Function<? super T,? extends K> classifier) { throw new RuntimeException("Stub!"); }
88
groupingByConcurrent(java.util.function.Function<? super T,? extends K> classifier, java.util.stream.Collector<? super T,A,D> downstream)89 public static <T, K, A, D> java.util.stream.Collector<T,?,java.util.concurrent.ConcurrentMap<K,D>> groupingByConcurrent(java.util.function.Function<? super T,? extends K> classifier, java.util.stream.Collector<? super T,A,D> downstream) { throw new RuntimeException("Stub!"); }
90
groupingByConcurrent(java.util.function.Function<? super T,? extends K> classifier, java.util.function.Supplier<M> mapFactory, java.util.stream.Collector<? super T,A,D> downstream)91 public static <T, K, A, D, M extends java.util.concurrent.ConcurrentMap<K, D>> java.util.stream.Collector<T,?,M> groupingByConcurrent(java.util.function.Function<? super T,? extends K> classifier, java.util.function.Supplier<M> mapFactory, java.util.stream.Collector<? super T,A,D> downstream) { throw new RuntimeException("Stub!"); }
92
partitioningBy(java.util.function.Predicate<? super T> predicate)93 public static <T> java.util.stream.Collector<T,?,java.util.Map<java.lang.Boolean,java.util.List<T>>> partitioningBy(java.util.function.Predicate<? super T> predicate) { throw new RuntimeException("Stub!"); }
94
partitioningBy(java.util.function.Predicate<? super T> predicate, java.util.stream.Collector<? super T,A,D> downstream)95 public static <T, D, A> java.util.stream.Collector<T,?,java.util.Map<java.lang.Boolean,D>> partitioningBy(java.util.function.Predicate<? super T> predicate, java.util.stream.Collector<? super T,A,D> downstream) { throw new RuntimeException("Stub!"); }
96
toMap(java.util.function.Function<? super T,? extends K> keyMapper, java.util.function.Function<? super T,? extends U> valueMapper)97 public static <T, K, U> java.util.stream.Collector<T,?,java.util.Map<K,U>> toMap(java.util.function.Function<? super T,? extends K> keyMapper, java.util.function.Function<? super T,? extends U> valueMapper) { throw new RuntimeException("Stub!"); }
98
toUnmodifiableMap(java.util.function.Function<? super T,? extends K> keyMapper, java.util.function.Function<? super T,? extends U> valueMapper)99 public static <T, K, U> java.util.stream.Collector<T,?,java.util.Map<K,U>> toUnmodifiableMap(java.util.function.Function<? super T,? extends K> keyMapper, java.util.function.Function<? super T,? extends U> valueMapper) { throw new RuntimeException("Stub!"); }
100
toMap(java.util.function.Function<? super T,? extends K> keyMapper, java.util.function.Function<? super T,? extends U> valueMapper, java.util.function.BinaryOperator<U> mergeFunction)101 public static <T, K, U> java.util.stream.Collector<T,?,java.util.Map<K,U>> toMap(java.util.function.Function<? super T,? extends K> keyMapper, java.util.function.Function<? super T,? extends U> valueMapper, java.util.function.BinaryOperator<U> mergeFunction) { throw new RuntimeException("Stub!"); }
102
toUnmodifiableMap(java.util.function.Function<? super T,? extends K> keyMapper, java.util.function.Function<? super T,? extends U> valueMapper, java.util.function.BinaryOperator<U> mergeFunction)103 public static <T, K, U> java.util.stream.Collector<T,?,java.util.Map<K,U>> toUnmodifiableMap(java.util.function.Function<? super T,? extends K> keyMapper, java.util.function.Function<? super T,? extends U> valueMapper, java.util.function.BinaryOperator<U> mergeFunction) { throw new RuntimeException("Stub!"); }
104
toMap(java.util.function.Function<? super T,? extends K> keyMapper, java.util.function.Function<? super T,? extends U> valueMapper, java.util.function.BinaryOperator<U> mergeFunction, java.util.function.Supplier<M> mapFactory)105 public static <T, K, U, M extends java.util.Map<K, U>> java.util.stream.Collector<T,?,M> toMap(java.util.function.Function<? super T,? extends K> keyMapper, java.util.function.Function<? super T,? extends U> valueMapper, java.util.function.BinaryOperator<U> mergeFunction, java.util.function.Supplier<M> mapFactory) { throw new RuntimeException("Stub!"); }
106
toConcurrentMap(java.util.function.Function<? super T,? extends K> keyMapper, java.util.function.Function<? super T,? extends U> valueMapper)107 public static <T, K, U> java.util.stream.Collector<T,?,java.util.concurrent.ConcurrentMap<K,U>> toConcurrentMap(java.util.function.Function<? super T,? extends K> keyMapper, java.util.function.Function<? super T,? extends U> valueMapper) { throw new RuntimeException("Stub!"); }
108
toConcurrentMap(java.util.function.Function<? super T,? extends K> keyMapper, java.util.function.Function<? super T,? extends U> valueMapper, java.util.function.BinaryOperator<U> mergeFunction)109 public static <T, K, U> java.util.stream.Collector<T,?,java.util.concurrent.ConcurrentMap<K,U>> toConcurrentMap(java.util.function.Function<? super T,? extends K> keyMapper, java.util.function.Function<? super T,? extends U> valueMapper, java.util.function.BinaryOperator<U> mergeFunction) { throw new RuntimeException("Stub!"); }
110
toConcurrentMap(java.util.function.Function<? super T,? extends K> keyMapper, java.util.function.Function<? super T,? extends U> valueMapper, java.util.function.BinaryOperator<U> mergeFunction, java.util.function.Supplier<M> mapFactory)111 public static <T, K, U, M extends java.util.concurrent.ConcurrentMap<K, U>> java.util.stream.Collector<T,?,M> toConcurrentMap(java.util.function.Function<? super T,? extends K> keyMapper, java.util.function.Function<? super T,? extends U> valueMapper, java.util.function.BinaryOperator<U> mergeFunction, java.util.function.Supplier<M> mapFactory) { throw new RuntimeException("Stub!"); }
112
summarizingInt(java.util.function.ToIntFunction<? super T> mapper)113 public static <T> java.util.stream.Collector<T,?,java.util.IntSummaryStatistics> summarizingInt(java.util.function.ToIntFunction<? super T> mapper) { throw new RuntimeException("Stub!"); }
114
summarizingLong(java.util.function.ToLongFunction<? super T> mapper)115 public static <T> java.util.stream.Collector<T,?,java.util.LongSummaryStatistics> summarizingLong(java.util.function.ToLongFunction<? super T> mapper) { throw new RuntimeException("Stub!"); }
116
summarizingDouble(java.util.function.ToDoubleFunction<? super T> mapper)117 public static <T> java.util.stream.Collector<T,?,java.util.DoubleSummaryStatistics> summarizingDouble(java.util.function.ToDoubleFunction<? super T> mapper) { throw new RuntimeException("Stub!"); }
118
119 @android.annotation.FlaggedApi(com.android.libcore.Flags.FLAG_V_APIS)
teeing(java.util.stream.Collector<? super T,?,R1> downstream1, java.util.stream.Collector<? super T,?,R2> downstream2, java.util.function.BiFunction<? super R1,? super R2,R> merger)120 public static <T, R1, R2, R> java.util.stream.Collector<T,?,R> teeing(java.util.stream.Collector<? super T,?,R1> downstream1, java.util.stream.Collector<? super T,?,R2> downstream2, java.util.function.BiFunction<? super R1,? super R2,R> merger) { throw new RuntimeException("Stub!"); }
121 }
122
123