/libcore/luni/src/test/java/libcore/java/util/ |
D | OptionalDoubleTest.java | 24 import java.util.OptionalDouble; 33 assertSame(OptionalDouble.empty(), OptionalDouble.empty()); in testEmpty_sameInstance() 37 assertEquals(56.0, OptionalDouble.of(56.0).getAsDouble()); in testGet() 40 OptionalDouble.empty().getAsDouble(); in testGet() 47 assertTrue(OptionalDouble.of(56.0).isPresent()); in testIsPresent() 48 assertFalse(OptionalDouble.empty().isPresent()); in testIsPresent() 53 OptionalDouble.empty().ifPresent(alwaysFails); in testIfPresent() 57 OptionalDouble.of(56.0).ifPresent(recorder); in testIfPresent() 62 assertEquals(57.0, OptionalDouble.empty().orElse(57.0)); in testOrElse() 63 assertEquals(56.0, OptionalDouble.of(56.0).orElse(57.0)); in testOrElse() [all …]
|
/libcore/ojluni/src/test/java/util/Optional/ |
D | BasicDouble.java | 41 import java.util.OptionalDouble; 54 void checkEmpty(OptionalDouble empty) { in checkEmpty() 55 assertTrue(empty.equals(OptionalDouble.empty())); in checkEmpty() 56 assertTrue(OptionalDouble.empty().equals(empty)); in checkEmpty() 57 assertFalse(empty.equals(OptionalDouble.of(UNEXPECTED))); in checkEmpty() 58 assertFalse(OptionalDouble.of(UNEXPECTED).equals(empty)); in checkEmpty() 94 void checkPresent(OptionalDouble opt, double expected) { in checkPresent() 95 assertFalse(opt.equals(OptionalDouble.empty())); in checkPresent() 96 assertFalse(OptionalDouble.empty().equals(opt)); in checkPresent() 97 assertTrue(opt.equals(OptionalDouble.of(expected))); in checkPresent() [all …]
|
/libcore/ojluni/src/main/java/java/util/ |
D | OptionalDouble.java | 59 public final class OptionalDouble { class 63 private static final OptionalDouble EMPTY = new OptionalDouble(); 77 private OptionalDouble() { in OptionalDouble() method in OptionalDouble 94 public static OptionalDouble empty() { in empty() 103 private OptionalDouble(double value) { in OptionalDouble() method in OptionalDouble 114 public static OptionalDouble of(double value) { in of() 115 return new OptionalDouble(value); in of() 298 return obj instanceof OptionalDouble other in equals()
|
/libcore/ojluni/src/main/java/java/util/stream/ |
D | FindOps.java | 28 import java.util.OptionalDouble; 92 public static TerminalOp<Double, OptionalDouble> makeDouble(boolean mustFindFirst) { in makeDouble() 251 static final class OfDouble extends FindSink<Double, OptionalDouble> 260 public OptionalDouble get() { in get() 261 return hasValue ? OptionalDouble.of(value) : null; in get() 264 static final TerminalOp<Double, OptionalDouble> OP_FIND_FIRST = new FindOp<>(true, 265 StreamShape.DOUBLE_VALUE, OptionalDouble.empty(), 266 OptionalDouble::isPresent, FindSink.OfDouble::new); 267 static final TerminalOp<Double, OptionalDouble> OP_FIND_ANY = new FindOp<>(false, 268 StreamShape.DOUBLE_VALUE, OptionalDouble.empty(), [all …]
|
D | DoubleStream.java | 30 import java.util.OptionalDouble; 584 OptionalDouble reduce(DoubleBinaryOperator op); in reduce() 725 OptionalDouble min(); in min() 746 OptionalDouble max(); in max() 801 OptionalDouble average(); in average() 894 OptionalDouble findFirst(); in findFirst() 913 OptionalDouble findAny(); in findAny()
|
D | DoublePipeline.java | 29 import java.util.OptionalDouble; 483 public final OptionalDouble min() { 488 public final OptionalDouble max() { 502 public final OptionalDouble average() { 524 ? OptionalDouble.of(Collectors.computeFinalSum(avg) / avg[2]) 525 : OptionalDouble.empty(); 545 public final OptionalDouble reduce(DoubleBinaryOperator op) { 577 public final OptionalDouble findFirst() { 582 public final OptionalDouble findAny() {
|
D | ReduceOps.java | 29 import java.util.OptionalDouble; 679 public static TerminalOp<Double, OptionalDouble> 683 implements AccumulatingSink<Double, OptionalDouble, ReducingSink>, Sink.OfDouble { 704 public OptionalDouble get() { 705 return empty ? OptionalDouble.empty() : OptionalDouble.of(state); 714 return new ReduceOp<Double, OptionalDouble, ReducingSink>(StreamShape.DOUBLE_VALUE) {
|
D | IntPipeline.java | 29 import java.util.OptionalDouble; 510 public final OptionalDouble average() { 521 ? OptionalDouble.of((double) avg[1] / avg[0]) 522 : OptionalDouble.empty();
|
D | LongPipeline.java | 29 import java.util.OptionalDouble; 488 public final OptionalDouble average() { 499 ? OptionalDouble.of((double) avg[1] / avg[0]) 500 : OptionalDouble.empty();
|
D | IntStream.java | 30 import java.util.OptionalDouble; 719 OptionalDouble average(); in average()
|
D | LongStream.java | 30 import java.util.OptionalDouble; 720 OptionalDouble average(); in average()
|
/libcore/ojluni/annotations/flagged_api/java/util/stream/ |
D | DoubleStream.annotated.java | 70 public java.util.OptionalDouble reduce(java.util.function.DoubleBinaryOperator op); in reduce() 76 public java.util.OptionalDouble min(); in min() 78 public java.util.OptionalDouble max(); in max() 82 public java.util.OptionalDouble average(); in average() 92 public java.util.OptionalDouble findFirst(); in findFirst() 94 public java.util.OptionalDouble findAny(); in findAny()
|
D | IntStream.annotated.java | 82 public java.util.OptionalDouble average(); in average()
|
D | LongStream.annotated.java | 82 public java.util.OptionalDouble average(); in average()
|
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ |
D | MinMaxTest.java | 33 import java.util.OptionalDouble; 94 assertEquals(DoubleStream.empty().min(), OptionalDouble.empty()); in testDoubleMinMax() 95 assertEquals(DoubleStream.empty().max(), OptionalDouble.empty()); in testDoubleMinMax()
|
D | FindAnyOpTest.java | 135 …OptionalDouble or = withData(data).terminal(fs, s -> s.findAny()).equalator(DOUBLE_VALID_ANSWER).e… in exerciseDoubleStream() 156 …static final BiConsumer<OptionalDouble, OptionalDouble> DOUBLE_VALID_ANSWER = (a, b) -> assertEqua…
|
D | SortedOpTest.java | 330 assertEquals(knownSize.apply(1).findFirst(), OptionalDouble.of(1)); in testDoubleSequentialShortCircuitTerminal() 331 assertEquals(knownSize.apply(1).findAny(), OptionalDouble.of(1)); in testDoubleSequentialShortCircuitTerminal() 332 assertEquals(unknownSize.apply(1).findFirst(), OptionalDouble.of(1)); in testDoubleSequentialShortCircuitTerminal() 333 assertEquals(unknownSize.apply(1).findAny(), OptionalDouble.of(1)); in testDoubleSequentialShortCircuitTerminal()
|
D | FindFirstOpTest.java | 132 OptionalDouble r = exerciseTerminalOps(data, fs, s -> s.findFirst()); in exerciseDoubleStream()
|
/libcore/ojluni/src/test/java/util/stream/testlib/org/openjdk/testlib/java/util/stream/ |
D | DefaultMethodStreams.java | 35 import java.util.OptionalDouble; 503 public OptionalDouble average() { in average() 709 public OptionalDouble average() { in average() 877 public OptionalDouble reduce(DoubleBinaryOperator op) { in reduce() 892 public OptionalDouble min() { in min() 897 public OptionalDouble max() { in max() 907 public OptionalDouble average() { in average() 932 public OptionalDouble findFirst() { in findFirst() 937 public OptionalDouble findAny() { in findAny()
|
/libcore/api/ |
D | current.txt | 14540 public final class OptionalDouble { 14541 method public static java.util.OptionalDouble empty(); 14547 method public static java.util.OptionalDouble of(double); 18241 method public java.util.OptionalDouble average(); 18251 method public java.util.OptionalDouble findAny(); 18252 method public java.util.OptionalDouble findFirst(); 18266 method public java.util.OptionalDouble max(); 18267 method public java.util.OptionalDouble min(); 18274 method public java.util.OptionalDouble reduce(java.util.function.DoubleBinaryOperator); 18299 method public java.util.OptionalDouble average(); [all …]
|
/libcore/ |
D | openjdk_java_files.bp | 960 "ojluni/src/main/java/java/util/OptionalDouble.java",
|
D | EXPECTED_UPSTREAM | 974 …jluni/src/main/java/java/util/OptionalDouble.java,jdk17u/jdk-17.0.6-ga,src/java.base/share/classes…
|