Home
last modified time | relevance | path

Searched refs:orElseGet (Results 1 – 8 of 8) 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.java182 assertSame(bar, empty.orElseGet(barSupplier)); in testOrElseGet()
183 assertSame(bar, ofNull.orElseGet(barSupplier)); in testOrElseGet()
187 assertSame(foo, optionalFoo.orElseGet(barSupplier)); in testOrElseGet()
/libcore/ojluni/src/main/java/java/util/
DOptionalInt.java161 public int orElseGet(IntSupplier other) { in orElseGet() method in OptionalInt
DOptionalLong.java161 public long orElseGet(LongSupplier other) { in orElseGet() method in OptionalLong
DOptionalDouble.java161 public double orElseGet(DoubleSupplier other) { in orElseGet() method in OptionalDouble
DOptional.java262 public T orElseGet(Supplier<? extends T> other) { in orElseGet() method in Optional