Right biased Either[Err, A]
.
An Attempt
is either an Attempt.Successful
or an Attempt.Failure
. Attempts can be created
by calling Attempt.successful
or Attempt.failure
, as well as converting from an Option
via
fromOption
.
- Companion
- object
Value members
Abstract methods
Maps the supplied function over the successful value, if present.
Maps the supplied function over the successful value, if present.
Converts an Attempt[Attempt[X]]
in to an Attempt[X]
.
Converts an Attempt[Attempt[X]]
in to an Attempt[X]
.
Transforms this attempt to a value of type B
using the supplied functions.
Transforms this attempt to a value of type B
using the supplied functions.
Returns the sucessful value if successful, otherwise the supplied default.
Returns the sucessful value if successful, otherwise the supplied default.
Maps the supplied function over the successful value, if present.
Maps the supplied function over the successful value, if present.
Maps the supplied function over the failure error, if present.
Maps the supplied function over the failure error, if present.
Returns this attempt if successful, otherwise the fallback attempt.
Returns this attempt if successful, otherwise the fallback attempt.
If this attempt is a failure, and the supplied partial function is defined for the cause of the failure, a successful attempt is returned. If this attempt is successful or the supplied function is not defined for the cause of the failure, this attempt is returned unmodified.
If this attempt is a failure, and the supplied partial function is defined for the cause of the failure, a successful attempt is returned. If this attempt is successful or the supplied function is not defined for the cause of the failure, this attempt is returned unmodified.
If this attempt is a failure, and the supplied partial function is defined for the cause of the failure, the result of applying that function is returned. If this attempt is successful or the supplied function is not defined for the cause of the failure, this attempt is returned unmodified.
If this attempt is a failure, and the supplied partial function is defined for the cause of the failure, the result of applying that function is returned. If this attempt is successful or the supplied function is not defined for the cause of the failure, this attempt is returned unmodified.
Returns the successful value if present; otherwise throws an IllegalArgumentException
.
Returns the successful value if present; otherwise throws an IllegalArgumentException
.