Uses of Interface
com.jongsoft.lang.control.Try
-
Packages that use Try Package Description com.jongsoft.lang This package contains all interfaces used through out the functional library.com.jongsoft.lang.control The control package contains flow control interfaces. -
-
Uses of Try in com.jongsoft.lang
Methods in com.jongsoft.lang that return Try Modifier and Type Method Description static Try<java.lang.Void>
Control. Try(CheckedRunner runner)
Attempt to execute the code in theCheckedRunner
.static <T> Try<T>
Control. Try(CheckedSupplier<T> supplier)
Attempt to execute code that will return an entity, but may also result into an exception. -
Uses of Try in com.jongsoft.lang.control
Methods in com.jongsoft.lang.control that return Try Modifier and Type Method Description default Try<T>
Try. consume(CheckedConsumer<? super T> consumer)
Passes then entity contained within theget()
if the try has a success.default <U> Try<U>
Try. map(java.util.function.Function<T,U> mapper)
<X extends java.lang.Throwable>
Try<T>Try. recover(java.util.function.Function<X,T> recoverMethod)
Set a fallback operation to be executed when the primary operation fails.default Try<T>
Try. run(CheckedRunner runner)
Allows for secondary runners to be executed within a try..catch.
-