Home
last modified time | relevance | path

Searched refs:orElseGet (Results 1 – 13 of 13) sorted by relevance

/libcore/luni/src/test/java/libcore/java/util/
DOptionalIntTest.java66 assertEquals(56, OptionalInt.of(56).orElseGet(alwaysFails)); in testOrElseGet()
69 assertEquals(57, OptionalInt.empty().orElseGet(supplies57)); in testOrElseGet()
DOptionalLongTest.java66 assertEquals(56, OptionalLong.of(56).orElseGet(alwaysFails)); in testOrElseGet()
69 assertEquals(57, OptionalLong.empty().orElseGet(supplies57)); in testOrElseGet()
DOptionalDoubleTest.java68 assertEquals(56.0, OptionalDouble.of(56.0).orElseGet(alwaysFails)); in testOrElseGet()
71 assertEquals(57.0, OptionalDouble.empty().orElseGet(supplies57)); in testOrElseGet()
DOptionalTest.java183 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/
DBasicInt.java68 assertEquals(empty.orElseGet(() -> UNEXPECTED), UNEXPECTED); in checkEmpty()
110 assertEquals(opt.orElseGet(() -> UNEXPECTED), expected); in checkPresent()
DBasicLong.java67 assertEquals(empty.orElseGet(() -> UNEXPECTED), UNEXPECTED); in checkEmpty()
109 assertEquals(opt.orElseGet(() -> UNEXPECTED), expected); in checkPresent()
DBasicDouble.java67 assertEquals(empty.orElseGet(() -> UNEXPECTED), UNEXPECTED); in checkEmpty()
109 assertEquals(opt.orElseGet(() -> UNEXPECTED), expected); in checkPresent()
DBasic.java71 assertEquals(empty.orElseGet(() -> "y"), "y"); in checkEmpty()
113 assertEquals(opt.orElseGet(() -> "unexpected"), expected); in checkPresent()
/libcore/ojluni/src/main/java/java/util/
DOptionalLong.java228 public long orElseGet(LongSupplier supplier) { in orElseGet() method in OptionalLong
DOptionalDouble.java228 public double orElseGet(DoubleSupplier supplier) { in orElseGet() method in OptionalDouble
DOptionalInt.java228 public int orElseGet(IntSupplier supplier) { in orElseGet() method in OptionalInt
DOptional.java364 public T orElseGet(Supplier<? extends T> supplier) { in orElseGet() method in Optional
/libcore/api/
Dcurrent.txt14156 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);