Searched refs:orElseGet (Results 1 – 8 of 8) sorted by relevance
66 assertEquals(56, OptionalInt.of(56).orElseGet(alwaysFails)); in testOrElseGet()69 assertEquals(57, OptionalInt.empty().orElseGet(supplies57)); in testOrElseGet()
66 assertEquals(56, OptionalLong.of(56).orElseGet(alwaysFails)); in testOrElseGet()69 assertEquals(57, OptionalLong.empty().orElseGet(supplies57)); in testOrElseGet()
68 assertEquals(56.0, OptionalDouble.of(56.0).orElseGet(alwaysFails)); in testOrElseGet()71 assertEquals(57.0, OptionalDouble.empty().orElseGet(supplies57)); in testOrElseGet()
182 assertSame(bar, empty.orElseGet(barSupplier)); in testOrElseGet()183 assertSame(bar, ofNull.orElseGet(barSupplier)); in testOrElseGet()187 assertSame(foo, optionalFoo.orElseGet(barSupplier)); in testOrElseGet()
161 public int orElseGet(IntSupplier other) { in orElseGet() method in OptionalInt
161 public long orElseGet(LongSupplier other) { in orElseGet() method in OptionalLong
161 public double orElseGet(DoubleSupplier other) { in orElseGet() method in OptionalDouble
262 public T orElseGet(Supplier<? extends T> other) { in orElseGet() method in Optional