Uses of Class
com.dudko.tools.safejavastreams.core.Result
Packages that use Result
-
Uses of Result in com.dudko.tools.safejavastreams.core
Subclasses of Result in com.dudko.tools.safejavastreams.coreModifier and TypeClassDescriptionstatic final classResult.Failure<T,E> Failure branch implementation.static final classResult.Success<T,E> Success branch implementation.Methods in com.dudko.tools.safejavastreams.core that return ResultModifier and TypeMethodDescriptionstatic <T,E> Result<T, E> Result.failure(E error) Creates a failure result.Applies predicate to the value, turning success into failure if predicate fails.Applies the function to the success value, returning another Result.Applies the function to the success value.Maps the error value if this is a failure.Executes action if failure.Executes action if success.Executes action regardless of result type.Recovers from failure with a fallback value.Recovers from failure with another Result.static <T,E> Result<T, E> Result.success(T value) Creates a success result.Method parameters in com.dudko.tools.safejavastreams.core with type arguments of type ResultModifier and TypeMethodDescriptionApplies the function to the success value, returning another Result.Executes action regardless of result type.Recovers from failure with another Result. -
Uses of Result in com.dudko.tools.safejavastreams.extensions
Methods in com.dudko.tools.safejavastreams.extensions that return ResultModifier and TypeMethodDescriptionstatic <T,E> Result<T, E> ResultExtensions.fromChecked(Supplier<T> supplier, Function<Throwable, ? extends E> errorMapper) Wraps a supplier that may throw, producing aResult.static <T,E> Result<T, E> ResultExtensions.fromFuture(CompletableFuture<T> future, Function<Throwable, ? extends E> errorMapper) Converts aCompletableFutureinto aResult.static <T,E> Result<T, E> ResultExtensions.fromOptional(Optional<T> optional, Supplier<? extends E> errorSupplier) static <T,E> Result<T, E> ResultExtensions.fromSupplier(Supplier<T> supplier, Function<Throwable, ? extends E> errorMapper) Wraps a supplier that may throw, producing aResult.