/libcore/luni/src/test/java/libcore/java/util/ |
D | OptionalIntTest.java | 23 import java.util.OptionalInt; 31 assertSame(OptionalInt.empty(), OptionalInt.empty()); in testEmpty_sameInstance() 35 assertEquals(56, OptionalInt.of(56).getAsInt()); in testGet() 38 OptionalInt.empty().getAsInt(); in testGet() 45 assertTrue(OptionalInt.of(56).isPresent()); in testIsPresent() 46 assertFalse(OptionalInt.empty().isPresent()); in testIsPresent() 51 OptionalInt.empty().ifPresent(alwaysFails); in testIfPresent() 55 OptionalInt.of(56).ifPresent(recorder); in testIfPresent() 60 assertEquals(57, OptionalInt.empty().orElse(57)); in testOrElse() 61 assertEquals(56, OptionalInt.of(56).orElse(57)); in testOrElse() [all …]
|
/libcore/ojluni/src/test/java/util/Optional/ |
D | BasicInt.java | 41 import java.util.OptionalInt; 55 void checkEmpty(OptionalInt empty) { in checkEmpty() 56 assertTrue(empty.equals(OptionalInt.empty())); in checkEmpty() 57 assertTrue(OptionalInt.empty().equals(empty)); in checkEmpty() 58 assertFalse(empty.equals(OptionalInt.of(UNEXPECTED))); in checkEmpty() 59 assertFalse(OptionalInt.of(UNEXPECTED).equals(empty)); in checkEmpty() 95 void checkPresent(OptionalInt opt, int expected) { in checkPresent() 96 assertFalse(opt.equals(OptionalInt.empty())); in checkPresent() 97 assertFalse(OptionalInt.empty().equals(opt)); in checkPresent() 98 assertTrue(opt.equals(OptionalInt.of(expected))); in checkPresent() [all …]
|
/libcore/ojluni/src/main/java/java/util/ |
D | OptionalInt.java | 59 public final class OptionalInt { class 63 private static final OptionalInt EMPTY = new OptionalInt(); 77 private OptionalInt() { in OptionalInt() method in OptionalInt 94 public static OptionalInt empty() { in empty() 103 private OptionalInt(int value) { in OptionalInt() method in OptionalInt 114 public static OptionalInt of(int value) { in of() 115 return new OptionalInt(value); in of() 296 return obj instanceof OptionalInt other in equals()
|
/libcore/ojluni/src/main/java/java/util/stream/ |
D | FindOps.java | 29 import java.util.OptionalInt; 70 public static TerminalOp<Integer, OptionalInt> makeInt(boolean mustFindFirst) { in makeInt() 207 static final class OfInt extends FindSink<Integer, OptionalInt> 216 public OptionalInt get() { in get() 217 return hasValue ? OptionalInt.of(value) : null; in get() 220 static final TerminalOp<Integer, OptionalInt> OP_FIND_FIRST = new FindOp<>(true, 221 StreamShape.INT_VALUE, OptionalInt.empty(), 222 OptionalInt::isPresent, FindSink.OfInt::new); 223 static final TerminalOp<Integer, OptionalInt> OP_FIND_ANY = new FindOp<>(false, 224 StreamShape.INT_VALUE, OptionalInt.empty(), [all …]
|
D | IntStream.java | 31 import java.util.OptionalInt; 581 OptionalInt reduce(IntBinaryOperator op); in reduce() 656 OptionalInt min(); in min() 673 OptionalInt max(); in max() 812 OptionalInt findFirst(); in findFirst() 831 OptionalInt findAny(); in findAny()
|
D | IntPipeline.java | 30 import java.util.OptionalInt; 495 public final OptionalInt min() { 500 public final OptionalInt max() { 537 public final OptionalInt reduce(IntBinaryOperator op) { 569 public final OptionalInt findFirst() { 574 public final OptionalInt findAny() {
|
D | ReduceOps.java | 30 import java.util.OptionalInt; 327 public static TerminalOp<Integer, OptionalInt> 331 implements AccumulatingSink<Integer, OptionalInt, ReducingSink>, Sink.OfInt { 352 public OptionalInt get() { 353 return empty ? OptionalInt.empty() : OptionalInt.of(state); 362 return new ReduceOp<Integer, OptionalInt, ReducingSink>(StreamShape.INT_VALUE) {
|
/libcore/ojluni/annotations/flagged_api/java/util/stream/ |
D | IntStream.annotated.java | 70 public java.util.OptionalInt reduce(java.util.function.IntBinaryOperator op); in reduce() 76 public java.util.OptionalInt min(); in min() 78 public java.util.OptionalInt max(); in max() 92 public java.util.OptionalInt findFirst(); in findFirst() 94 public java.util.OptionalInt findAny(); in findAny()
|
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ |
D | MinMaxTest.java | 34 import java.util.OptionalInt; 68 assertEquals(IntStream.empty().min(), OptionalInt.empty()); in testIntMinMax() 69 assertEquals(IntStream.empty().max(), OptionalInt.empty()); in testIntMinMax()
|
D | FindAnyOpTest.java | 87 …OptionalInt or = withData(data).terminal(fs, s -> s.findAny()).equalator(INT_VALID_ANSWER).exercis… in exerciseIntStream() 152 …static final BiConsumer<OptionalInt, OptionalInt> INT_VALID_ANSWER = (a, b) -> assertEquals(a.isPr…
|
D | IntReduceTest.java | 33 import java.util.OptionalInt; 58 OptionalInt seedless = exerciseTerminalOps(data, s -> s.reduce(irPlus)); in testOps()
|
D | SortedOpTest.java | 234 assertEquals(knownSize.apply(1).findFirst(), OptionalInt.of(1)); in testIntSequentialShortCircuitTerminal() 235 assertEquals(knownSize.apply(1).findAny(), OptionalInt.of(1)); in testIntSequentialShortCircuitTerminal() 236 assertEquals(unknownSize.apply(1).findFirst(), OptionalInt.of(1)); in testIntSequentialShortCircuitTerminal() 237 assertEquals(unknownSize.apply(1).findAny(), OptionalInt.of(1)); in testIntSequentialShortCircuitTerminal()
|
D | FindFirstOpTest.java | 92 OptionalInt r = exerciseTerminalOps(data, fs, s -> s.findFirst()); in exerciseIntStream()
|
/libcore/ojluni/src/test/java/util/stream/testlib/org/openjdk/testlib/java/util/stream/ |
D | DefaultMethodStreams.java | 36 import java.util.OptionalInt; 473 public OptionalInt reduce(IntBinaryOperator op) { in reduce() 488 public OptionalInt min() { in min() 493 public OptionalInt max() { in max() 528 public OptionalInt findFirst() { in findFirst() 533 public OptionalInt findAny() { in findAny()
|
/libcore/ojluni/src/main/java/java/lang/constant/ |
D | DirectMethodHandleDesc.java | 29 import java.util.OptionalInt;
|
/libcore/ |
D | openjdk_java_files.bp | 958 "ojluni/src/main/java/java/util/OptionalInt.java",
|
D | EXPECTED_UPSTREAM | 975 ojluni/src/main/java/java/util/OptionalInt.java,jdk17u/jdk-17.0.6-ga,src/java.base/share/classes/ja…
|
/libcore/api/ |
D | current.txt | 14555 public final class OptionalInt { 14556 method public static java.util.OptionalInt empty(); 14562 method public static java.util.OptionalInt of(int); 18309 method public java.util.OptionalInt findAny(); 18310 method public java.util.OptionalInt findFirst(); 18324 method public java.util.OptionalInt max(); 18325 method public java.util.OptionalInt min(); 18334 method public java.util.OptionalInt reduce(java.util.function.IntBinaryOperator);
|