An asynchronous result.
This class groups all the methods needed in order to manage an asynchronous result that can be successful (Success] or not (Failure).
Type of the value in case of success.
Type of the error in case of failure. It has to extend Throwable.
Failed result with error error.
Successful result with value value.
True if the result is an error, false otherwise.
True if the result was successful, false otherwise.
Returns the error associated. In case of Success, error will be null.
Converts the Either value according to f function.
Converts the Either error according to f function.
Calls the function f with a specific error when Either is failure.
Calls the function f with a specific value when Either is successful.
Returns the value associated. In case of Failure, value will be null.