Left<L, R> class
Represent the Left case of the Either monad, containing a value of type L.
Constructors
- Left(L value)
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → L
-
final
Methods
-
combine<
T> (Either< L, T> other, R combiner(R, T)) → Either<L, R> -
Returns combined version of the two Either objects
override
-
flatMap<
T> (Either< L, T> f(R value)) → Either<L, T> -
Applies a function to the value in the
Rightcase, and returns the result as a newEitherinstance.override -
fold<
T> (T ifLeft(L left), T ifRight(R right)) → T -
Applies a function to the value in the
RightorLeftcase, and returns the result.override -
getOrElse(
R defaultValue) → R -
Returns the value inside the
Rightcase or the provided default value.override -
map<
T> (T f(R value)) → Either< L, T> -
Applies a function to the value in the
Rightcase. Returns a newEitherinstance with the result of the function.override -
mapLeft<
T> (T f(L value)) → Either< T, R> -
Applies a function to the value in the
Leftcase.
Returns a newEitherinstance with the result of the function.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
orElse(
Either< L, R> other) → Either<L, R> -
Applies a function to the value in the
Leftcase, and returns the result as a newEitherinstance.override -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override