Expected is wrapper object around either a value or an error.
< The error type of expected
< The value type of expected
Create an expected instance, one of the provided arguments must be null else the expected will be treated as a value.
Functional interface to run an action on expected types.
Functional interface to transform expected types.
Fold the expected to a common type.
Retruns the value, if available, or produces a fallback with the provided function.
Returns if the expected contains an error.
Returns if the expected contains a value.
Map both value or error to a new type.
Map error to a new type or return encapsulated value.
Map value to a new type or return the encapsulated error.
Execute an action if this expected is an error.