Home
last modified time | relevance | path

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

/libcore/ojluni/src/main/java/java/util/
DOptionalInt.java240 public int orElseThrow() { in orElseThrow() method in OptionalInt
264 public<X extends Throwable> int orElseThrow(Supplier<? extends X> exceptionSupplier) throws X { in orElseThrow() method in OptionalInt
DOptionalLong.java240 public long orElseThrow() { in orElseThrow() method in OptionalLong
264 public<X extends Throwable> long orElseThrow(Supplier<? extends X> exceptionSupplier) throws X { in orElseThrow() method in OptionalLong
DOptionalDouble.java240 public double orElseThrow() { in orElseThrow() method in OptionalDouble
264 … public<X extends Throwable> double orElseThrow(Supplier<? extends X> exceptionSupplier) throws X { in orElseThrow() method in OptionalDouble
DOptional.java376 public T orElseThrow() { in orElseThrow() method in Optional
400 public <X extends Throwable> T orElseThrow(Supplier<? extends X> exceptionSupplier) throws X { in orElseThrow() method in Optional
/libcore/luni/src/test/java/libcore/java/util/
DOptionalIntTest.java76 assertEquals(57, OptionalInt.of(57).orElseThrow(barSupplier)); in testOrElseThrow()
79 OptionalInt.empty().orElseThrow(barSupplier); in testOrElseThrow()
DOptionalLongTest.java76 assertEquals(57, OptionalLong.of(57).orElseThrow(barSupplier)); in testOrElseThrow()
79 OptionalLong.empty().orElseThrow(barSupplier); in testOrElseThrow()
DOptionalDoubleTest.java78 assertEquals(57.0, OptionalDouble.of(57.0).orElseThrow(barSupplier)); in testOrElseThrow()
81 OptionalDouble.empty().orElseThrow(barSupplier); in testOrElseThrow()
DOptionalTest.java198 empty.orElseThrow(barSupplier); in testOrElseThrow()
205 ofNull.orElseThrow(barSupplier); in testOrElseThrow()
213 assertSame(foo, optionalFoo.orElseThrow(barSupplier)); in testOrElseThrow()
/libcore/ojluni/src/test/java/util/Optional/
DBasicInt.java74 assertThrows(ObscureException.class, () -> empty.orElseThrow(ObscureException::new)); in checkEmpty()
115 assertEquals(opt.orElseThrow(ObscureException::new), expected); in checkPresent()
DBasicLong.java73 assertThrows(ObscureException.class, () -> empty.orElseThrow(ObscureException::new)); in checkEmpty()
115 assertEquals(opt.orElseThrow(ObscureException::new), expected); in checkPresent()
DBasicDouble.java73 assertThrows(ObscureException.class, () -> empty.orElseThrow(ObscureException::new)); in checkEmpty()
115 assertEquals(opt.orElseThrow(ObscureException::new), expected); in checkPresent()
DBasic.java77 assertThrows(ObscureException.class, () -> empty.orElseThrow(ObscureException::new)); in checkEmpty()
119 assertEquals(opt.orElseThrow(ObscureException::new), expected); in checkPresent()
/libcore/api/
Dcurrent.txt13759 method public T orElseThrow();
13760 …method public <X extends java.lang.Throwable> T orElseThrow(java.util.function.Supplier<? extends …
13774 method public double orElseThrow();
13775 …method public <X extends java.lang.Throwable> double orElseThrow(java.util.function.Supplier<? ext…
13789 method public int orElseThrow();
13790 …method public <X extends java.lang.Throwable> int orElseThrow(java.util.function.Supplier<? extend…
13804 method public long orElseThrow();
13805 …method public <X extends java.lang.Throwable> long orElseThrow(java.util.function.Supplier<? exten…