Home
last modified time | relevance | path

Searched refs:mapper (Results 1 – 18 of 18) sorted by relevance

/libcore/ojluni/src/test/java/util/stream/testlib/org/openjdk/testlib/java/util/stream/
DDefaultMethodStreams.java192 public <R> Stream<R> map(Function<? super T, ? extends R> mapper) { in map() argument
193 return s.map(mapper); in map()
197 public IntStream mapToInt(ToIntFunction<? super T> mapper) { in mapToInt() argument
198 return s.mapToInt(mapper); in mapToInt()
202 public LongStream mapToLong(ToLongFunction<? super T> mapper) { in mapToLong() argument
203 return s.mapToLong(mapper); in mapToLong()
207 public DoubleStream mapToDouble(ToDoubleFunction<? super T> mapper) { in mapToDouble() argument
208 return s.mapToDouble(mapper); in mapToDouble()
212 public <R> Stream<R> flatMap(Function<? super T, ? extends Stream<? extends R>> mapper) { in flatMap() argument
213 return s.flatMap(mapper); in flatMap()
[all …]
/libcore/ojluni/src/main/java/java/util/stream/
DReferencePipeline.java200 public final <R> Stream<R> map(Function<? super P_OUT, ? extends R> mapper) {
201 Objects.requireNonNull(mapper);
209 downstream.accept(mapper.apply(u));
217 public final IntStream mapToInt(ToIntFunction<? super P_OUT> mapper) {
218 Objects.requireNonNull(mapper);
227 downstream.accept(mapper.applyAsInt(u));
235 public final LongStream mapToLong(ToLongFunction<? super P_OUT> mapper) {
236 Objects.requireNonNull(mapper);
245 downstream.accept(mapper.applyAsLong(u));
253 public final DoubleStream mapToDouble(ToDoubleFunction<? super P_OUT> mapper) {
[all …]
DStream.java194 <R> Stream<R> map(Function<? super T, ? extends R> mapper); in map() argument
208 IntStream mapToInt(ToIntFunction<? super T> mapper); in mapToInt() argument
222 LongStream mapToLong(ToLongFunction<? super T> mapper); in mapToLong() argument
236 DoubleStream mapToDouble(ToDoubleFunction<? super T> mapper); in mapToDouble() argument
281 <R> Stream<R> flatMap(Function<? super T, ? extends Stream<? extends R>> mapper); in flatMap() argument
301 IntStream flatMapToInt(Function<? super T, ? extends IntStream> mapper); in flatMapToInt() argument
321 LongStream flatMapToLong(Function<? super T, ? extends LongStream> mapper); in flatMapToLong() argument
341 DoubleStream flatMapToDouble(Function<? super T, ? extends DoubleStream> mapper); in flatMapToDouble() argument
426 default <R> Stream<R> mapMulti(BiConsumer<? super T, ? super Consumer<R>> mapper) { in mapMulti() argument
427 Objects.requireNonNull(mapper); in mapMulti()
[all …]
DIntPipeline.java181 private <U> Stream<U> mapToObj(IntFunction<? extends U> mapper, int opFlags) { in mapToObj() argument
189 downstream.accept(mapper.apply(t)); in mapToObj()
247 public final IntStream map(IntUnaryOperator mapper) {
248 Objects.requireNonNull(mapper);
257 downstream.accept(mapper.applyAsInt(t));
265 public final <U> Stream<U> mapToObj(IntFunction<? extends U> mapper) {
266 Objects.requireNonNull(mapper);
267 return mapToObj(mapper, StreamOpFlag.NOT_SORTED | StreamOpFlag.NOT_DISTINCT);
271 public final LongStream mapToLong(IntToLongFunction mapper) {
272 Objects.requireNonNull(mapper);
[all …]
DLongPipeline.java178 private <U> Stream<U> mapToObj(LongFunction<? extends U> mapper, int opFlags) { in mapToObj() argument
186 downstream.accept(mapper.apply(t)); in mapToObj()
229 public final LongStream map(LongUnaryOperator mapper) {
230 Objects.requireNonNull(mapper);
239 downstream.accept(mapper.applyAsLong(t));
247 public final <U> Stream<U> mapToObj(LongFunction<? extends U> mapper) {
248 Objects.requireNonNull(mapper);
249 return mapToObj(mapper, StreamOpFlag.NOT_SORTED | StreamOpFlag.NOT_DISTINCT);
253 public final IntStream mapToInt(LongToIntFunction mapper) {
254 Objects.requireNonNull(mapper);
[all …]
DDoublePipeline.java177 private <U> Stream<U> mapToObj(DoubleFunction<? extends U> mapper, int opFlags) { in mapToObj() argument
185 downstream.accept(mapper.apply(t)); in mapToObj()
212 public final DoubleStream map(DoubleUnaryOperator mapper) {
213 Objects.requireNonNull(mapper);
222 downstream.accept(mapper.applyAsDouble(t));
230 public final <U> Stream<U> mapToObj(DoubleFunction<? extends U> mapper) {
231 Objects.requireNonNull(mapper);
232 return mapToObj(mapper, StreamOpFlag.NOT_SORTED | StreamOpFlag.NOT_DISTINCT);
236 public final IntStream mapToInt(DoubleToIntFunction mapper) {
237 Objects.requireNonNull(mapper);
[all …]
DDoubleStream.java101 DoubleStream map(DoubleUnaryOperator mapper); in map() argument
116 <U> Stream<U> mapToObj(DoubleFunction<? extends U> mapper); in mapToObj() argument
130 IntStream mapToInt(DoubleToIntFunction mapper); in mapToInt() argument
144 LongStream mapToLong(DoubleToLongFunction mapper); in mapToLong() argument
164 DoubleStream flatMap(DoubleFunction<? extends DoubleStream> mapper); in flatMap() argument
194 default DoubleStream mapMulti(DoubleMapMultiConsumer mapper) { in mapMulti() argument
195 Objects.requireNonNull(mapper); in mapMulti()
198 mapper.accept(e, buffer); in mapMulti()
DIntStream.java102 IntStream map(IntUnaryOperator mapper); in map() argument
117 <U> Stream<U> mapToObj(IntFunction<? extends U> mapper); in mapToObj() argument
131 LongStream mapToLong(IntToLongFunction mapper); in mapToLong() argument
145 DoubleStream mapToDouble(IntToDoubleFunction mapper); in mapToDouble() argument
165 IntStream flatMap(IntFunction<? extends IntStream> mapper); in flatMap() argument
195 default IntStream mapMulti(IntMapMultiConsumer mapper) { in mapMulti() argument
196 Objects.requireNonNull(mapper); in mapMulti()
199 mapper.accept(e, buffer); in mapMulti()
DLongStream.java102 LongStream map(LongUnaryOperator mapper); in map() argument
117 <U> Stream<U> mapToObj(LongFunction<? extends U> mapper); in mapToObj() argument
131 IntStream mapToInt(LongToIntFunction mapper); in mapToInt() argument
145 DoubleStream mapToDouble(LongToDoubleFunction mapper); in mapToDouble() argument
165 LongStream flatMap(LongFunction<? extends LongStream> mapper); in flatMap() argument
195 default LongStream mapMulti(LongMapMultiConsumer mapper) { in mapMulti() argument
196 Objects.requireNonNull(mapper); in mapMulti()
199 mapper.accept(e, buffer); in mapMulti()
DCollectors.java466 Collector<T, ?, R> mapping(Function<? super T, ? extends U> mapper,
470 (r, t) -> downstreamAccumulator.accept(r, mapper.apply(t)),
511 Collector<T, ?, R> flatMapping(Function<? super T, ? extends Stream<? extends U>> mapper,
516 try (Stream<? extends U> result = mapper.apply(t)) {
679 summingInt(ToIntFunction<? super T> mapper) {
682 (a, t) -> { a[0] += mapper.applyAsInt(t); },
697 summingLong(ToLongFunction<? super T> mapper) {
700 (a, t) -> { a[0] += mapper.applyAsLong(t); },
722 summingDouble(ToDoubleFunction<? super T> mapper) {
733 (a, t) -> { double val = mapper.applyAsDouble(t);
[all …]
/libcore/ojluni/src/main/java/java/util/
DOptional.java255 public <U> Optional<U> map(Function<? super T, ? extends U> mapper) { in map() argument
256 Objects.requireNonNull(mapper); in map()
260 return Optional.ofNullable(mapper.apply(value)); in map()
283 public <U> Optional<U> flatMap(Function<? super T, ? extends Optional<? extends U>> mapper) { in flatMap() argument
284 Objects.requireNonNull(mapper); in flatMap()
289 Optional<U> r = (Optional<U>) mapper.apply(value); in flatMap()
/libcore/ojluni/annotations/flagged_api/java/util/stream/
DDoubleStream.annotated.java33 public java.util.stream.DoubleStream map(java.util.function.DoubleUnaryOperator mapper); in map() argument
35 …lic <U> java.util.stream.Stream<U> mapToObj(java.util.function.DoubleFunction<? extends U> mapper); in mapToObj() argument
37 public java.util.stream.IntStream mapToInt(java.util.function.DoubleToIntFunction mapper); in mapToInt() argument
39 public java.util.stream.LongStream mapToLong(java.util.function.DoubleToLongFunction mapper); in mapToLong() argument
41 …eStream flatMap(java.util.function.DoubleFunction<? extends java.util.stream.DoubleStream> mapper); in flatMap() argument
44 …ubleStream mapMulti(java.util.stream.DoubleStream.DoubleMapMultiConsumer mapper) { throw new Runti… in mapMulti() argument
DIntStream.annotated.java33 public java.util.stream.IntStream map(java.util.function.IntUnaryOperator mapper); in map() argument
35 public <U> java.util.stream.Stream<U> mapToObj(java.util.function.IntFunction<? extends U> mapper); in mapToObj() argument
37 public java.util.stream.LongStream mapToLong(java.util.function.IntToLongFunction mapper); in mapToLong() argument
39 public java.util.stream.DoubleStream mapToDouble(java.util.function.IntToDoubleFunction mapper); in mapToDouble() argument
41 …eam.IntStream flatMap(java.util.function.IntFunction<? extends java.util.stream.IntStream> mapper); in flatMap() argument
44 …stream.IntStream mapMulti(java.util.stream.IntStream.IntMapMultiConsumer mapper) { throw new Runti… in mapMulti() argument
DLongStream.annotated.java33 public java.util.stream.LongStream map(java.util.function.LongUnaryOperator mapper); in map() argument
35 public <U> java.util.stream.Stream<U> mapToObj(java.util.function.LongFunction<? extends U> mapper); in mapToObj() argument
37 public java.util.stream.IntStream mapToInt(java.util.function.LongToIntFunction mapper); in mapToInt() argument
39 public java.util.stream.DoubleStream mapToDouble(java.util.function.LongToDoubleFunction mapper); in mapToDouble() argument
41 ….LongStream flatMap(java.util.function.LongFunction<? extends java.util.stream.LongStream> mapper); in flatMap() argument
44 …eam.LongStream mapMulti(java.util.stream.LongStream.LongMapMultiConsumer mapper) { throw new Runti… in mapMulti() argument
DCollectors.annotated.java49 …lector<T,?,R> mapping(java.util.function.Function<? super T,? extends U> mapper, java.util.stream.… in mapping() argument
51 …ction.Function<? super T,? extends java.util.stream.Stream<? extends U>> mapper, java.util.stream.… in flatMapping() argument
63 …ava.lang.Integer> summingInt(java.util.function.ToIntFunction<? super T> mapper) { throw new Runti… in summingInt() argument
65 …java.lang.Long> summingLong(java.util.function.ToLongFunction<? super T> mapper) { throw new Runti… in summingLong() argument
67 …ang.Double> summingDouble(java.util.function.ToDoubleFunction<? super T> mapper) { throw new Runti… in summingDouble() argument
69 …va.lang.Double> averagingInt(java.util.function.ToIntFunction<? super T> mapper) { throw new Runti… in averagingInt() argument
71 ….lang.Double> averagingLong(java.util.function.ToLongFunction<? super T> mapper) { throw new Runti… in averagingLong() argument
73 …g.Double> averagingDouble(java.util.function.ToDoubleFunction<? super T> mapper) { throw new Runti… in averagingDouble() argument
79 … reducing(U identity, java.util.function.Function<? super T,? extends U> mapper, java.util.functio… in reducing() argument
113 …ryStatistics> summarizingInt(java.util.function.ToIntFunction<? super T> mapper) { throw new Runti… in summarizingInt() argument
[all …]
/libcore/ojluni/src/test/java/util/stream/Collectors/
DCollectorsTest.java93 private final Function<T, V> mapper; field in CollectorsTest.MappingAssertion
96 MappingAssertion(Function<T, V> mapper, CollectorAssertion<V, R> downstream) { in MappingAssertion() argument
97 this.mapper = mapper; in MappingAssertion()
104 () -> source.get().map(mapper::apply), in assertValue()
110 private final Function<T, Stream<V>> mapper; field in CollectorsTest.FlatMappingAssertion
113 FlatMappingAssertion(Function<T, Stream<V>> mapper, in FlatMappingAssertion() argument
115 this.mapper = mapper; in FlatMappingAssertion()
122 () -> source.get().flatMap(mapper::apply), in assertValue()
271 private final Function<T, U> mapper; field in CollectorsTest.ReducingAssertion
274 ReducingAssertion(U identity, Function<T, U> mapper, BinaryOperator<U> reducer) { in ReducingAssertion() argument
[all …]
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/
DCollectorsTest.java90 private final Function<T, V> mapper; field in CollectorsTest.MappingAssertion
93 MappingAssertion(Function<T, V> mapper, CollectorAssertion<V, R> downstream) { in MappingAssertion() argument
94 this.mapper = mapper; in MappingAssertion()
101 () -> source.get().map(mapper), in assertValue()
107 private final Function<T, Stream<V>> mapper; field in CollectorsTest.FlatMappingAssertion
110 FlatMappingAssertion(Function<T, Stream<V>> mapper, in FlatMappingAssertion() argument
112 this.mapper = mapper; in FlatMappingAssertion()
119 () -> source.get().flatMap(mapper), in assertValue()
268 private final Function<T, U> mapper; field in CollectorsTest.ReducingAssertion
271 ReducingAssertion(U identity, Function<T, U> mapper, BinaryOperator<U> reducer) { in ReducingAssertion() argument
[all …]
DTabulatorsTest.java210 private final Function<T, U> mapper; field in TabulatorsTest.ReduceAssertion
213 ReduceAssertion(U identity, Function<T, U> mapper, BinaryOperator<U> reducer) { in ReduceAssertion() argument
215 this.mapper = mapper; in ReduceAssertion()
222 Optional<U> reduced = source.get().map(mapper).reduce(reducer); in assertValue()