Searched refs:orElseThrow (Results 1 – 8 of 8) sorted by relevance
76 assertEquals(57, OptionalInt.of(57).orElseThrow(barSupplier)); in testOrElseThrow()79 OptionalInt.empty().orElseThrow(barSupplier); in testOrElseThrow()
76 assertEquals(57, OptionalLong.of(57).orElseThrow(barSupplier)); in testOrElseThrow()79 OptionalLong.empty().orElseThrow(barSupplier); in testOrElseThrow()
78 assertEquals(57.0, OptionalDouble.of(57.0).orElseThrow(barSupplier)); in testOrElseThrow()81 OptionalDouble.empty().orElseThrow(barSupplier); in testOrElseThrow()
197 empty.orElseThrow(barSupplier); in testOrElseThrow()204 ofNull.orElseThrow(barSupplier); in testOrElseThrow()212 assertSame(foo, optionalFoo.orElseThrow(barSupplier)); in testOrElseThrow()
181 public<X extends Throwable> int orElseThrow(Supplier<X> exceptionSupplier) throws X { in orElseThrow() method in OptionalInt
181 public<X extends Throwable> long orElseThrow(Supplier<X> exceptionSupplier) throws X { in orElseThrow() method in OptionalLong
181 public<X extends Throwable> double orElseThrow(Supplier<X> exceptionSupplier) throws X { in orElseThrow() method in OptionalDouble
282 public <X extends Throwable> T orElseThrow(Supplier<? extends X> exceptionSupplier) throws X { in orElseThrow() method in Optional