Searched refs:orElse (Results 1 – 12 of 12) sorted by relevance
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ |
D | IntReduceTest.java | 60 assertEquals(folded, seedless.orElse(0)); in testOps() 64 assertEquals(folded, seedless.orElse(Integer.MAX_VALUE)); in testOps() 68 assertEquals(folded, seedless.orElse(Integer.MIN_VALUE)); in testOps() 72 assertEquals(folded, seedless.orElse(0)); in testOps() 76 assertEquals(folded, seedless.orElse(Integer.MAX_VALUE)); in testOps() 80 assertEquals(folded, seedless.orElse(Integer.MIN_VALUE)); in testOps()
|
D | ReduceTest.java | 66 assertEquals(folded, seedless.orElse(0)); in testOps() 70 assertEquals(folded, seedless.orElse(Integer.MAX_VALUE)); in testOps() 74 assertEquals(folded, seedless.orElse(Integer.MIN_VALUE)); in testOps() 78 assertEquals(folded, seedless.orElse(0)); in testOps() 82 assertEquals(folded, seedless.orElse(Integer.MAX_VALUE)); in testOps() 86 assertEquals(folded, seedless.orElse(Integer.MIN_VALUE)); in testOps()
|
D | FindFirstOpTest.java | 55 …exerciseOps(countTo(0), s -> Arrays.asList(new Integer[]{s.findFirst().orElse(-1)}).stream(), Arra… in testFindFirst() 56 …), s -> Arrays.asList(new Integer[]{s.filter(e -> e == 1499).findFirst().orElse(-1)}).stream(), Ar… in testFindFirst()
|
D | TabulatorsTest.java | 292 s -> s.min(Integer::compare).orElse(Integer.MAX_VALUE)); 294 s -> s.max(Integer::compare).orElse(Integer.MIN_VALUE)); 314 s -> s.mapToInt(x -> x * 2).average().orElse(0)); 316 s -> s.mapToLong(x -> x * 2).average().orElse(0)); 318 s -> s.mapToDouble(x -> x * 2).average().orElse(0)); 333 s -> s.mapToInt(x -> x * 2).average().orElse(0));
|
/libcore/luni/src/test/java/libcore/java/util/ |
D | OptionalIntTest.java | 60 assertEquals(57, OptionalInt.empty().orElse(57)); in testOrElse() 61 assertEquals(56, OptionalInt.of(56).orElse(57)); in testOrElse()
|
D | OptionalLongTest.java | 60 assertEquals(57, OptionalLong.empty().orElse(57)); in testOrElse() 61 assertEquals(56, OptionalLong.of(56).orElse(57)); in testOrElse()
|
D | OptionalDoubleTest.java | 62 assertEquals(57.0, OptionalDouble.empty().orElse(57.0)); in testOrElse() 63 assertEquals(56.0, OptionalDouble.of(56.0).orElse(57.0)); in testOrElse()
|
D | OptionalTest.java | 167 assertSame(bar, empty.orElse(bar)); in testOrElse() 168 assertSame(bar, ofNull.orElse(bar)); in testOrElse() 172 assertSame(foo, optionalFoo.orElse(bar)); in testOrElse()
|
/libcore/ojluni/src/main/java/java/util/ |
D | OptionalInt.java | 147 public int orElse(int other) { in orElse() method in OptionalInt
|
D | OptionalLong.java | 147 public long orElse(long other) { in orElse() method in OptionalLong
|
D | OptionalDouble.java | 147 public double orElse(double other) { in orElse() method in OptionalDouble
|
D | Optional.java | 248 public T orElse(T other) { in orElse() method in Optional
|