java.util.function.BooleanSupplier@FunctionalInterface
public interface ThrowingBooleanSupplier
extends java.util.function.BooleanSupplier
boolean-valued results, possibly throwing an exception.| Modifier and Type | Method | Description |
|---|---|---|
default java.util.function.BooleanSupplier |
fallbackTo(java.util.function.BooleanSupplier fallback) |
Returns a
BooleanSupplier returning from the given supplier if this supplier throws an exception. |
default java.util.function.BooleanSupplier |
fallbackTo(java.util.function.BooleanSupplier fallback,
java.util.function.Consumer<java.lang.Exception> exceptionConsumer) |
Returns a
BooleanSupplier returning from the given supplier if this supplier throws an exception. |
default boolean |
getAsBoolean() |
Returns a result.
|
boolean |
getAsBooleanThrowing() |
Returns a result.
|
default java.util.function.BooleanSupplier |
orReturn(boolean value) |
Returns a
BooleanSupplier returning the given value if this supplier throws an exception. |
default java.util.function.BooleanSupplier |
orReturn(boolean value,
java.util.function.Consumer<java.lang.Exception> exceptionConsumer) |
Returns a
BooleanSupplier returning the given value if this supplier throws an exception. |
default ThrowingBooleanSupplier |
orThrow(java.lang.Class<? extends java.lang.RuntimeException> exceptionClass) |
Returns a
ThrowingBooleanSupplier throwing an exception of the given type if this supplier throws an exception. |
default ThrowingBooleanSupplier |
orThrow(java.lang.Class<? extends java.lang.RuntimeException> exceptionClass,
java.lang.String message) |
Returns a
ThrowingBooleanSupplier throwing an exception of the given type if this supplier throws an exception. |
default ThrowingBooleanSupplier |
orTryWith(ThrowingBooleanSupplier other) |
Returns a
ThrowingBooleanSupplier returning from the given supplier if this supplier throws an exception. |
default ThrowingBooleanSupplier |
orTryWith(ThrowingBooleanSupplier other,
java.util.function.Consumer<java.lang.Exception> exceptionConsumer) |
Returns a
ThrowingBooleanSupplier returning from the given supplier if this supplier throws an exception. |
default java.util.function.BooleanSupplier fallbackTo(java.util.function.BooleanSupplier fallback)
BooleanSupplier returning from the given supplier if this supplier throws an exception.java.lang.IllegalArgumentException - if fallback is nulldefault java.util.function.BooleanSupplier fallbackTo(java.util.function.BooleanSupplier fallback,
java.util.function.Consumer<java.lang.Exception> exceptionConsumer)
BooleanSupplier returning from the given supplier if this supplier throws an exception.java.lang.IllegalArgumentException - if fallback is nulldefault boolean getAsBoolean()
UncheckedException.getAsBoolean in interface java.util.function.BooleanSupplierboolean getAsBooleanThrowing()
throws java.lang.Exception
java.lang.Exceptiondefault java.util.function.BooleanSupplier orReturn(boolean value)
BooleanSupplier returning the given value if this supplier throws an exception.default java.util.function.BooleanSupplier orReturn(boolean value,
java.util.function.Consumer<java.lang.Exception> exceptionConsumer)
BooleanSupplier returning the given value if this supplier throws an exception.default ThrowingBooleanSupplier orThrow(java.lang.Class<? extends java.lang.RuntimeException> exceptionClass)
ThrowingBooleanSupplier throwing an exception of the given type if this supplier throws an exception.
The original exception thrown by this supplier is the cause of the thrown exception.
The exception class must have a constructor accepting a single Throwable as an argument.
java.lang.IllegalArgumentException - if exceptionClass is nulldefault ThrowingBooleanSupplier orThrow(java.lang.Class<? extends java.lang.RuntimeException> exceptionClass, java.lang.String message)
ThrowingBooleanSupplier throwing an exception of the given type if this supplier throws an exception.
The original exception thrown by this supplier is the cause of the thrown exception.
The exception class must have a constructor accepting String and Throwable as arguments.
java.lang.IllegalArgumentException - if exceptionClass is nulldefault ThrowingBooleanSupplier orTryWith(ThrowingBooleanSupplier other)
ThrowingBooleanSupplier returning from the given supplier if this supplier throws an exception.java.lang.IllegalArgumentException - if other is nulldefault ThrowingBooleanSupplier orTryWith(ThrowingBooleanSupplier other, java.util.function.Consumer<java.lang.Exception> exceptionConsumer)
ThrowingBooleanSupplier returning from the given supplier if this supplier throws an exception.java.lang.IllegalArgumentException - if other is null