Uses of Interface
io.blt.util.functional.ThrowingSupplier
-
Uses of ThrowingSupplier in io.blt.util
Modifier and TypeMethodDescriptionstatic <K,
V, E extends Throwable>
VCtr.computeIfAbsent
(Map<K, V> map, K key, ThrowingSupplier<? extends V, E> compute) For the specifiedmap
, if there is no value for the specifiedkey
thencompute
will be called and the result entered into the map.static <T,
E extends Throwable>
TObj.orElseGet
(T value, ThrowingSupplier<T, E> supplier) Returnsvalue
if non-null, else invokes and returns the result ofsupplier
.static <T,
E extends Throwable>
TObj.orElseOnException
(ThrowingSupplier<T, E> supplier, T defaultValue) Invokes and returns the result ofsupplier
if no exception is thrown, else returnsdefaultValue
.Obj.orEmptyOnException
(ThrowingSupplier<T, E> supplier) Invokes and returns the result ofsupplier
if no exception is thrown; otherwise, returns empty.static <R,
E extends Throwable>
REx.transformExceptions
(ThrowingSupplier<R, ? extends Exception> supplier, Function<? super Exception, E> transformer) Executes a supplier, transforming any thrownException
using a specified function.