Representation of an operation that has either succeeded with a result (represented by Success) or failed with an exception (represented by Failure).
Returns true iff the Try is a Success.
true
Returns true iff the Try is a Failure.
Maps the given function to the values from this Success and other, or returns this if this is a Failure or other if other is a Failure.
this
Applies the given action to the error if Failure, or does nothing if Success. Returns this for chaining.
Applies the given action to the value if Success, or does nothing if Failure. Returns this for chaining.
Returns the given function applied to the value from this Success, or returns this if this is a Failure.
Returns the value if a Success otherwise throws the exception if a Failure.
Maps the given function to the value from this Success, or returns this if this is a Failure.
If this is a Failure wrapping an Error then throw it, otherwise return this for chaining.