/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ |
D | IntReduceTest.java | 41 assertEquals(55, Arrays.stream(a).reduce(irPlus).getAsInt()); in testReduce() 42 assertEquals(55, Arrays.stream(a).reduce(0, irPlus)); in testReduce() 43 assertEquals(10, Arrays.stream(a).reduce(irMax).getAsInt()); in testReduce() 44 assertEquals(1, Arrays.stream(a).reduce(irMin).getAsInt()); in testReduce() 46 assertEquals(0, IntStream.empty().reduce(0, irPlus)); in testReduce() 47 assertFalse(IntStream.empty().reduce(irPlus).isPresent()); in testReduce() 49 assertEquals(110, Arrays.stream(a).map(irDoubler).reduce(irPlus).getAsInt()); in testReduce() 50 assertEquals(20, Arrays.stream(a).map(irDoubler).reduce(irMax).getAsInt()); in testReduce() 51 assertEquals(2, Arrays.stream(a).map(irDoubler).reduce(irMin).getAsInt()); in testReduce() 56 …assertEquals(0, (int) exerciseTerminalOps(data, s -> s.filter(ipFalse), s -> s.reduce(0, irPlus))); in testOps() [all …]
|
D | ReduceTest.java | 47 assertEquals(55, (int) list.stream().reduce(rPlus).get()); in testReduce() 48 assertEquals(55, (int) list.stream().reduce(0, rPlus)); in testReduce() 49 assertEquals(10, (int) list.stream().reduce(rMax).get()); in testReduce() 50 assertEquals(1, (int) list.stream().reduce(rMin).get()); in testReduce() 52 assertEquals(0, (int) countTo(0).stream().reduce(0, rPlus)); in testReduce() 53 assertTrue(!countTo(0).stream().reduce(rPlus).isPresent()); in testReduce() 55 assertEquals(110, (int) list.stream().map(mDoubler).reduce(rPlus).get()); in testReduce() 56 assertEquals(20, (int) list.stream().map(mDoubler).reduce(rMax).get()); in testReduce() 57 assertEquals(2, (int) list.stream().map(mDoubler).reduce(rMin).get()); in testReduce() 62 …assertEquals(0, (int) exerciseTerminalOps(data, s -> s.filter(pFalse), s -> s.reduce(0, rPlus, rPl… in testOps() [all …]
|
D | PrimitiveSumTest.java | 49 expectedResult(data.stream().asLongStream().reduce(0, LambdaTestHelpers.lrPlus)). in testOps() 59 expectedResult(data.stream().reduce(0, LambdaTestHelpers.lrPlus)). in testOps() 73 expectedResult(data.stream().reduce(0, LambdaTestHelpers.drPlus)). in testOps()
|
D | WhileOpStatefulTest.java | 71 .mapToLong(e -> 1).reduce(0, Long::sum); in testTimedTakeWithCount() 103 .mapToLong(e -> 1).reduce(0, Long::sum); in testCountTakeWithCount() 170 .mapToLong(e -> 1).reduce(0, Long::sum); in testCountDropWithCount()
|
D | TabulatorsTest.java | 136 .reduce(mergeFn) in assertValue() 222 Optional<U> reduced = source.get().map(mapper).reduce(reducer); in assertValue() 290 s -> s.reduce(0, Integer::sum)); 297 s -> s.reduce(Integer::sum)); 304 s -> s.map(x -> x*2).reduce(0, Integer::sum)); 307 s -> s.map(x -> x*2L).reduce(0L, Long::sum)); 309 s -> s.map(x -> x*2).reduce(0, Integer::sum)); 311 s -> s.map(x -> x * 2.0d).reduce(0.0d, Double::sum));
|
D | RangeTest.java | 133 terminal(s -> s.reduce(0, Integer::sum)).exercise(); in tesIntRangeReduce() 139 terminal(s -> s.reduce(0, Integer::sum)).exercise(); in testIntInfiniteRangeLimit() 216 terminal(s -> s.reduce(0, Long::sum)).exercise(); in testLongRangeReduce() 222 terminal(s -> s.reduce(0, Long::sum)).exercise(); in testLongInfiniteRangeLimit()
|
D | DoublePrimitiveOpsTests.java | 41 …double sum = Arrays.asList(1.0, 2.0, 3.0, 4.0, 5.0).stream().mapToDouble(i -> i).reduce(0.0, Doubl… in testUnBox()
|
D | ReduceByOpTest.java | 57 … assertEquals(entry.getValue(), data.stream().filter(e -> pEven.test(e) == key).reduce(0, rPlus)); in testOps()
|
D | StreamSpliteratorTest.java | 251 s -> s.reduce(Integer::sum) in testSplitting() 345 s -> s.reduce(Integer::sum) in testIntSplitting() 438 s -> s.reduce(Long::sum) in testLongSplitting() 531 s -> s.reduce(Double::sum) in testDoubleSplitting()
|
D | LongPrimitiveOpsTests.java | 79 long sum = l.stream().reduce(0L, (a, b) -> a + b); in testBox()
|
D | IntPrimitiveOpsTests.java | 79 int sum = l.stream().reduce(0, (a, b) -> a + b); in testBox()
|
/libcore/ojluni/src/test/java/util/stream/testlib/org/openjdk/testlib/java/util/stream/ |
D | DefaultMethodStreams.java | 282 public T reduce(T identity, BinaryOperator<T> accumulator) { in reduce() method in DefaultMethodStreams.DefaultMethodRefStream 283 return s.reduce(identity, accumulator); in reduce() 287 public Optional<T> reduce(BinaryOperator<T> accumulator) { in reduce() method in DefaultMethodStreams.DefaultMethodRefStream 288 return s.reduce(accumulator); in reduce() 292 …public <U> U reduce(U identity, BiFunction<U, ? super T, U> accumulator, BinaryOperator<U> combine… in reduce() method in DefaultMethodStreams.DefaultMethodRefStream 293 return s.reduce(identity, accumulator, combiner); in reduce() 468 public int reduce(int identity, IntBinaryOperator op) { in reduce() method in DefaultMethodStreams.DefaultMethodIntStream 469 return s.reduce(identity, op); in reduce() 473 public OptionalInt reduce(IntBinaryOperator op) { in reduce() method in DefaultMethodStreams.DefaultMethodIntStream 474 return s.reduce(op); in reduce() [all …]
|
/libcore/ojluni/src/test/java/lang/StackWalker/ |
D | WalkFunction.java | 60 Optional<StackFrame> result = walker.walk(WalkFunction::reduce); in testFunctions() 66 static Optional<StackFrame> reduce(Stream<StackFrame> stream) { in reduce() method in WalkFunction 69 return stream.reduce((r,f) -> { in reduce()
|
/libcore/ojluni/src/main/java/java/util/stream/ |
D | DistinctOps.java | 58 <P_IN> Node<T> reduce(PipelineHelper<T> helper, Spliterator<P_IN> spliterator) { in makeRef() 77 return reduce(helper, spliterator); in makeRef() 112 return reduce(helper, spliterator).spliterator(); in makeRef()
|
D | LongPipeline.java | 415 return reduce(0, Long::sum); 420 return reduce(Math::min); 425 return reduce(Math::max); 456 public final long reduce(long identity, LongBinaryOperator op) { 461 public final OptionalLong reduce(LongBinaryOperator op) {
|
D | IntPipeline.java | 433 return reduce(0, Integer::sum); 438 return reduce(Math::min); 443 return reduce(Math::max); 474 public final int reduce(int identity, IntBinaryOperator op) { 479 public final OptionalInt reduce(IntBinaryOperator op) {
|
D | DoubleStream.java | 377 double reduce(double identity, DoubleBinaryOperator op); in reduce() method 414 OptionalDouble reduce(DoubleBinaryOperator op); in reduce() method
|
D | ReferencePipeline.java | 493 public final P_OUT reduce(final P_OUT identity, final BinaryOperator<P_OUT> accumulator) { 498 public final Optional<P_OUT> reduce(BinaryOperator<P_OUT> accumulator) { 503 …public final <R> R reduce(R identity, BiFunction<R, ? super P_OUT, R> accumulator, BinaryOperator<… 535 return reduce(BinaryOperator.maxBy(comparator)); 540 return reduce(BinaryOperator.minBy(comparator));
|
D | IntStream.java | 370 int reduce(int identity, IntBinaryOperator op); in reduce() method 407 OptionalInt reduce(IntBinaryOperator op); in reduce() method
|
D | DoublePipeline.java | 422 return reduce(Math::min); 427 return reduce(Math::max); 477 public final double reduce(double identity, DoubleBinaryOperator op) { 482 public final OptionalDouble reduce(DoubleBinaryOperator op) {
|
D | LongStream.java | 375 long reduce(long identity, LongBinaryOperator op); in reduce() method 412 OptionalLong reduce(LongBinaryOperator op); in reduce() method
|
D | Stream.java | 961 T reduce(T identity, BinaryOperator<T> accumulator); 1001 Optional<T> reduce(BinaryOperator<T> accumulator); 1050 <U> U reduce(U identity,
|
/libcore/ojluni/src/test/java/util/stream/Collectors/ |
D | CollectorsTest.java | 197 .reduce(mergeFn) in assertValue() 281 Optional<U> reduced = source.get().map(mapper).reduce(reducer); in assertValue() 349 s -> s.reduce(0, Integer::sum)); 356 s -> s.reduce(Integer::sum)); 363 s -> s.map(x -> x*2).reduce(0, Integer::sum)); 366 s -> s.map(x -> x*2L).reduce(0L, Long::sum)); 368 s -> s.map(x -> x*2).reduce(0, Integer::sum)); 370 s -> s.map(x -> x * 2.0d).reduce(0.0d, Double::sum));
|
/libcore/benchmarks/ |
D | README.md | 17 Extra options to reduce noise:
|
/libcore/ojluni/src/main/java/sun/security/provider/certpath/ |
D | Builder.java | 348 permitted.reduce(excluded); in targetDistance()
|