Searched refs:orElseGet (Results 1 – 13 of 13) sorted by relevance
/libcore/luni/src/test/java/libcore/java/util/ |
D | OptionalIntTest.java | 66 assertEquals(56, OptionalInt.of(56).orElseGet(alwaysFails)); in testOrElseGet() 69 assertEquals(57, OptionalInt.empty().orElseGet(supplies57)); in testOrElseGet()
|
D | OptionalLongTest.java | 66 assertEquals(56, OptionalLong.of(56).orElseGet(alwaysFails)); in testOrElseGet() 69 assertEquals(57, OptionalLong.empty().orElseGet(supplies57)); in testOrElseGet()
|
D | OptionalDoubleTest.java | 68 assertEquals(56.0, OptionalDouble.of(56.0).orElseGet(alwaysFails)); in testOrElseGet() 71 assertEquals(57.0, OptionalDouble.empty().orElseGet(supplies57)); in testOrElseGet()
|
D | OptionalTest.java | 183 assertSame(bar, empty.orElseGet(barSupplier)); in testOrElseGet() 184 assertSame(bar, ofNull.orElseGet(barSupplier)); in testOrElseGet() 188 assertSame(foo, optionalFoo.orElseGet(barSupplier)); in testOrElseGet()
|
/libcore/ojluni/src/test/java/util/Optional/ |
D | BasicInt.java | 68 assertEquals(empty.orElseGet(() -> UNEXPECTED), UNEXPECTED); in checkEmpty() 110 assertEquals(opt.orElseGet(() -> UNEXPECTED), expected); in checkPresent()
|
D | BasicLong.java | 67 assertEquals(empty.orElseGet(() -> UNEXPECTED), UNEXPECTED); in checkEmpty() 109 assertEquals(opt.orElseGet(() -> UNEXPECTED), expected); in checkPresent()
|
D | BasicDouble.java | 67 assertEquals(empty.orElseGet(() -> UNEXPECTED), UNEXPECTED); in checkEmpty() 109 assertEquals(opt.orElseGet(() -> UNEXPECTED), expected); in checkPresent()
|
D | Basic.java | 71 assertEquals(empty.orElseGet(() -> "y"), "y"); in checkEmpty() 113 assertEquals(opt.orElseGet(() -> "unexpected"), expected); in checkPresent()
|
/libcore/ojluni/src/main/java/java/util/ |
D | OptionalLong.java | 228 public long orElseGet(LongSupplier supplier) { in orElseGet() method in OptionalLong
|
D | OptionalDouble.java | 228 public double orElseGet(DoubleSupplier supplier) { in orElseGet() method in OptionalDouble
|
D | OptionalInt.java | 228 public int orElseGet(IntSupplier supplier) { in orElseGet() method in OptionalInt
|
D | Optional.java | 364 public T orElseGet(Supplier<? extends T> supplier) { in orElseGet() method in Optional
|
/libcore/api/ |
D | current.txt | 14156 method public T orElseGet(java.util.function.Supplier<? extends T>); 14171 method public double orElseGet(java.util.function.DoubleSupplier); 14186 method public int orElseGet(java.util.function.IntSupplier); 14201 method public long orElseGet(java.util.function.LongSupplier);
|