Uses of Interface
io.blt.util.functional.ThrowingSupplier
Packages that use ThrowingSupplier
-
Uses of ThrowingSupplier in io.blt.util
Methods in io.blt.util with parameters of type ThrowingSupplierModifier 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 specifiedkeythencomputewill be called and the result entered into the map.static <T,E extends Throwable>
TObj.orElseGet(T value, ThrowingSupplier<T, E> supplier) Returnsvalueif 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 ofsupplierif no exception is thrown, else returnsdefaultValue.Obj.orEmptyOnException(ThrowingSupplier<T, E> supplier) Invokes and returns the result ofsupplierif 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 thrownExceptionusing a specified function.