Uses of Class
org.javimmutable.collections.Result
-
Uses of Result in org.javimmutable.collections
Modifier and TypeMethodDescriptionResult.apply
(Proc1Throws<T, ? super Exception> proc) Does nothing if we are a failure result.Result.Failure.apply
(Proc1Throws<T, ? super Exception> proc) Result.Success.apply
(Proc1Throws<T, ? super Exception> proc) static <T> Result
<T> Attempts to compute a value and returns an appropriateResult
.Computation.compute()
Execute the computation and return aResult
containing the final value or an exception that terminated the computation.static <T> Result
<T> Creates a failureResult
containing the exception that was thrown.<U> Result
<U> abstract <U> Result
<U> Replaces our successful result with a new value computed using the provided function.<U> Result
<U> Result.Failure.flatMapFailure
(Func1Throws<Exception, Result<T>, Exception> func) Result.flatMapFailure
(Func1Throws<Exception, Result<T>, Exception> func) Replaces our failure result with a new value computed using the provided function.Result.Success.flatMapFailure
(Func1Throws<Exception, Result<T>, Exception> func) <U> Result
<U> Result.Failure.map
(Func1Throws<T, U, Exception> func) abstract <U> Result
<U> Result.map
(Func1Throws<T, U, Exception> func) Replaces our successful result with a new value computed using the provided function.<U> Result
<U> Result.Success.map
(Func1Throws<T, U, Exception> func) Result.Failure.mapFailure
(Func1Throws<Exception, T, Exception> func) Result.mapFailure
(Func1Throws<Exception, T, Exception> func) Replaces our failure result with a new value computed using the provided function.Result.Success.mapFailure
(Func1Throws<Exception, T, Exception> func) static <T> Result
<T> Result.success
(T value) Creates a successfulResult
containing the given value.Modifier and TypeMethodDescription<U> Result
<U> abstract <U> Result
<U> Replaces our successful result with a new value computed using the provided function.<U> Result
<U> Result.Failure.flatMapFailure
(Func1Throws<Exception, Result<T>, Exception> func) Result.flatMapFailure
(Func1Throws<Exception, Result<T>, Exception> func) Replaces our failure result with a new value computed using the provided function.Result.Success.flatMapFailure
(Func1Throws<Exception, Result<T>, Exception> func)