Uses of Interface
org.apache.juneau.commons.function.ThrowingSupplier
Packages that use ThrowingSupplier
-
Uses of ThrowingSupplier in org.apache.juneau.commons.utils
Methods in org.apache.juneau.commons.utils with parameters of type ThrowingSupplierModifier and TypeMethodDescriptionstatic <T> TThrowableUtils.safe(ThrowingSupplier<T> s) Executes a supplier; wraps any checked exception inRuntimeException.static <T> TThrowableUtils.safe(ThrowingSupplier<T> s, Function<Throwable, RuntimeException> exceptionMapper) Executes a supplier; maps any checked exception via the provided function.static <T> TThrowableUtils.safeCatch(ThrowingSupplier<T> s, Function<Throwable, T> exceptionFunction) Executes a supplier; returns the result or a fallback value produced by the exception function.static <T> Optional<T>ThrowableUtils.safeOpt(ThrowingSupplier<T> s) Executes a supplier; returns anOptionalof the result, or empty if an exception is thrown.static <T> Optional<T>ThrowableUtils.safeOptCatch(ThrowingSupplier<T> s, Function<Throwable, T> exceptionFunction) Executes a supplier; returns anOptionalof the result or the exception function's value.static <T> TThrowableUtils.safeOrNull(ThrowingSupplier<T> s) Executes a supplier; returns the result ornullif an exception is thrown.