Uses of Class
io.activej.common.collection.Try
Packages that use Try
-
Uses of Try in io.activej.common.collection
Methods in io.activej.common.collection that return TryModifier and TypeMethodDescriptionTry.consume(@NotNull BiConsumer<? super T, Exception> consumer) Consumes both a result and an exception of thisTry.Try.consume(@NotNull Consumer<? super T> resultConsumer, @NotNull Consumer<Exception> exceptionConsumer) Consumes a result of thisTryif it is successful.<U> @NotNull Try<U>Try.ifException(@NotNull Consumer<Exception> exceptionConsumer) Consumes an exception of thisTryif it is failed.Consumes a result of thisTryif it is successful.<U> @NotNull Try<U>Try.map(@NotNull FunctionEx<T, U> function) static <T> Try<T>Try.of(T result) Creates a new successfulTrywith a resultstatic <T> Try<T>Creates a newTrywhich is either successful and has a result or is failed and has an exceptionstatic <T> Try<T>Try.ofException(@NotNull Exception e) Creates a new failedTrywith a given exceptionstatic <T> Try<T>Try.wrap(@NotNull RunnableEx computation) Creates a newTrywhich is either successful or failed based on the result of a runnable callstatic <T> Try<T>Try.wrap(@NotNull SupplierEx<T> computation) Creates a newTrywhich is either successful or failed based on the result of a supplier callstatic <T> Try<T>Creates a newTrywhich is either successful or failed based on the result of a callable callMethod parameters in io.activej.common.collection with type arguments of type Try