An Errors handling class. Consider changing name to EHan. The main ways to consume the final result of the flatMap operation are fold, getElse, foreach and forEither. This corresponds, but is not functionally equivalent to an Either[StrList, A] or Either[List[String], +A]. There are advantages to having a separate class and I find that I rarely use Either apart from with standard errors as the Left type. However use the methods biMap, to Either, eitherMap and eitherFlatMap when interoperability with Either is required. In my view Either[T] class is redundant and is rarely used except as an errors handler. So it makes sense to use a dedicated class.
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
Members list
Value members
Abstract methods
These are implemented in the base traits GoodBase[+A] and BadBase[+A] as Either[+A, +B] boxes all value classes.
These are implemented in the base traits GoodBase[+A] and BadBase[+A] as Either[+A, +B] boxes all value classes.
Attributes
These are implemented in the base traits GoodBase[+A] and BadBase[+A] as Either[+A, +B] boxes all value classes.
These are implemented in the base traits GoodBase[+A] and BadBase[+A] as Either[+A, +B] boxes all value classes.
Attributes
Fold the EMon of type A into a type of B.
Fold the EMon of type A into a type of B.
Attributes
Will perform action if Good. Does nothing if Bad.
Will perform action if Good. Does nothing if Bad.
Attributes
This is just a Unit returning fold, but is preferred because the method is explicit that it is called for effects, rather than to return a value. This method is implemented in the leaf Good classes to avoid boxing.
This is just a Unit returning fold, but is preferred because the method is explicit that it is called for effects, rather than to return a value. This method is implemented in the leaf Good classes to avoid boxing.
Attributes
Gets the value of Good, throws exception on Bad.
Gets the value of Good, throws exception on Bad.
Attributes
Gets the value of Good or returns the elseValue parameter if Bad. Both Good and Bad should be implemented in the leaf classes to avoid unnecessary boxing of primitive values.
Gets the value of Good or returns the elseValue parameter if Bad. Both Good and Bad should be implemented in the leaf classes to avoid unnecessary boxing of primitive values.
Attributes
Maps the Good case of this EMon with the function.
Maps the Good case of this EMon with the function.
Attributes
Maps Good to Right[Strings, D] and Bad to Left[Strings, D]. These are implemented in the base traits GoodBase[+A] and BadBase[+A] as Either[+A, +B] boxes all value classes.
Maps Good to Right[Strings, D] and Bad to Left[Strings, D]. These are implemented in the base traits GoodBase[+A] and BadBase[+A] as Either[+A, +B] boxes all value classes.
Attributes
Concrete methods
Creates new errors for an ENone.
Creates new errors for an ENone.
Attributes
Creates a new error for an ENone.
Creates a new error for an ENone.
Attributes
Method on EMon[SeqGen[A]]. If this is good, the sequence is mapped with a function from A to EMon[B]. If that mapping produces on Good value, the unique Good value is returned.
Method on EMon[SeqGen[A]]. If this is good, the sequence is mapped with a function from A to EMon[B]. If that mapping produces on Good value, the unique Good value is returned.