Success
A successful EOr
Type parameters
- A
-
Type of the value this EOr can contain
Value parameters
- a
-
A value
Attributes
- Graph
-
- Supertypes
Members list
Value members
Inherited methods
Provides a next EOr if this one has a value, ignoring the value
Provides a next EOr if this one has a value, ignoring the value
Type parameters
- B
-
Type of value in next EOr
Value parameters
- next
-
Next EOr in case this one has a value
Attributes
- Returns
-
Next EOr or a new EOr containing E in this one
- Inherited from:
- EOr
Filters this EOr by value in it, if it exists, using given function
Filters this EOr by value in it, if it exists, using given function
Value parameters
- condition
-
Filtering function
- filteredError
-
E conversion function
Attributes
- Returns
-
This EOr of a new EOr containing an E computed by given conversion function
- Inherited from:
- EOr
Computes a new EOr using value in this, if it exists, with given flat mapping function
Computes a new EOr using value in this, if it exists, with given flat mapping function
Type parameters
- B
-
Type of the new value
Value parameters
- f
-
Flat mapping function
Attributes
- Returns
-
Computed EOr or a new EOr containing E in this one
- Inherited from:
- EOr
Computes a new EOr using E in this, if it exists, with given flat mapping function
Computes a new EOr using E in this, if it exists, with given flat mapping function
Type parameters
- AA
-
Type of the new value
Value parameters
- f
-
E flat mapping function
Attributes
- Returns
-
This EOr or a computed EOr if this one has E
- Inherited from:
- EOr
Folds this into a single value, handling both E and value conversions with given functions
Folds this into a single value, handling both E and value conversions with given functions
Type parameters
- B
-
Type of the desired result
Value parameters
- ifFailure
-
Conversion function for E
- ifSuccess
-
Conversion function for value
Attributes
- Returns
-
Converted result
- Inherited from:
- EOr
Alias of onValue
Gets the value in this or falls back to given default value
Gets the value in this or falls back to given default value
Type parameters
- AA
-
Type of default value
Value parameters
- default
-
Default value to use in case this has E
Attributes
- Returns
-
Value in this or given default value
- Inherited from:
- EOr
Handles E in this EOr, if it exists, by given partial function to compute a successful EOr
Handles E in this EOr, if it exists, by given partial function to compute a successful EOr
Type parameters
- AA
-
Type of value returned by partial function
Value parameters
- f
-
Partial function to handle E
Attributes
- Returns
-
A new EOr containing handled value if partial function was defined for E in this EOr or this EOr as is
- Inherited from:
- EOr
Handles E in this EOr, if it exists, by given partial function to compute a new EOr
Handles E in this EOr, if it exists, by given partial function to compute a new EOr
Type parameters
- AA
-
Type of value in EOr returned by partial function
Value parameters
- f
-
Partial function to compute new EOr
Attributes
- Returns
-
Computed new EOr if partial function was defined for E in this EOr or this EOr as is
- Inherited from:
- EOr
Converts value in this, if it exists, using given mapping function to make a new EOr
Converts value in this, if it exists, using given mapping function to make a new EOr
Type parameters
- B
-
Type of the new value
Value parameters
- f
-
Mapping function
Attributes
- Returns
-
A new EOr containing either the new value or E in this one
- Inherited from:
- EOr
Converts E in this, if it exists, using given mapping function to make a new EOr
Converts E in this, if it exists, using given mapping function to make a new EOr
Value parameters
- f
-
E mapping function
Attributes
- Returns
-
This EOr or a new EOr containing computed E if this one has E
- Inherited from:
- EOr
Performs a side-effect using error in this, if it exists
Performs a side-effect using error in this, if it exists
Type parameters
- U
-
Type of result of the side-effect
Value parameters
- f
-
Side-effecting function
Attributes
- Inherited from:
- EOr
Performs a side-effect using value in this, if it exists
Performs a side-effect using value in this, if it exists
Type parameters
- U
-
Type of result of the side-effect
Value parameters
- f
-
Side-effecting function
Attributes
- Inherited from:
- EOr
Provides an alternative EOr if this one has E, ignoring the E
Provides an alternative EOr if this one has E, ignoring the E
Type parameters
- AA
-
Type of value in alternative EOr
Value parameters
- alternative
-
Alternative EOr in case this one has E
Attributes
- Returns
-
This EOr or alternative if this one has E
- Inherited from:
- EOr
Attributes
- Inherited from:
- Product
Attributes
- Inherited from:
- Product
Converts this EOr to an Either
Converts this EOr to an Either
Attributes
- Returns
-
An Either containing E in this EOr or value in this EOr
- Inherited from:
- EOr
Filters this EOr by value in it, if it exists, using given function
Filters this EOr by value in it, if it exists, using given function
Value parameters
- condition
-
Filtering function
Attributes
- Returns
-
This EOr of a new EOr containing filtered error
- See also
- Inherited from:
- EOr
Inherited fields
Whether or not this contains an E
Whether or not this contains a value