/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ |
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 | 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 | 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 | 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 | IntPrimitiveOpsTests.java | 79 int sum = l.stream().reduce(0, (a, b) -> a + b); in testBox()
|
D | LongPrimitiveOpsTests.java | 79 long sum = l.stream().reduce(0L, (a, b) -> a + b); in testBox()
|
/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 | Stream.java | 607 T reduce(T identity, BinaryOperator<T> accumulator); in reduce() method 647 Optional<T> reduce(BinaryOperator<T> accumulator); in reduce() method 696 <U> U reduce(U identity, in reduce() method
|
D | IntPipeline.java | 431 return reduce(0, Integer::sum); 436 return reduce(Math::min); 441 return reduce(Math::max); 472 public final int reduce(int identity, IntBinaryOperator op) { 477 public final OptionalInt reduce(IntBinaryOperator op) {
|
D | LongPipeline.java | 413 return reduce(0, Long::sum); 418 return reduce(Math::min); 423 return reduce(Math::max); 454 public final long reduce(long identity, LongBinaryOperator op) { 459 public final OptionalLong reduce(LongBinaryOperator 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 | 491 public final P_OUT reduce(final P_OUT identity, final BinaryOperator<P_OUT> accumulator) { 496 public final Optional<P_OUT> reduce(BinaryOperator<P_OUT> accumulator) { 501 …public final <R> R reduce(R identity, BiFunction<R, ? super P_OUT, R> accumulator, BinaryOperator<… 533 return reduce(BinaryOperator.maxBy(comparator)); 538 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 | 420 return reduce(Math::min); 425 return reduce(Math::max); 475 public final double reduce(double identity, DoubleBinaryOperator op) { 480 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
|
/libcore/ojluni/src/main/java/sun/security/provider/certpath/ |
D | Builder.java | 348 permitted.reduce(excluded); in targetDistance()
|
/libcore/ojluni/src/main/java/sun/security/x509/ |
D | GeneralSubtrees.java | 496 public void reduce(GeneralSubtrees excluded) { in reduce() method in GeneralSubtrees
|
D | NameConstraintsExtension.java | 391 permitted.reduce(excluded); in merge()
|
/libcore/jsr166-tests/src/test/java/jsr166/ |
D | ConcurrentHashMap8Test.java | 845 … Long r = m.reduce(Long.MAX_VALUE, (Long x, Long y) -> Long.valueOf(x.longValue() + y.longValue()), in testMappedReduceSequentially() 877 r = m.reduce(1L, (Long x, Long y) -> Long.valueOf(x.longValue() + y.longValue()), in testMappedReduceInParallel()
|
/libcore/ojluni/annotations/sdk/nullability/java/util/concurrent/ |
D | ConcurrentHashMap.annotated.java | 136 …@libcore.util.Nullable public <U> U reduce(long parallelismThreshold, @libcore.util.NonNull java.u… in reduce() method in ConcurrentHashMap
|
/libcore/ojluni/src/main/java/java/util/concurrent/ |
D | ConcurrentHashMap.java | 3785 public <U> U reduce(long parallelismThreshold, in reduce() method in ConcurrentHashMap
|