Left<L, R> class
final
Represents the left side of Either (typically an error)
- Inheritance
- Available extensions
Constructors
- Left.new(L value)
-
const
Properties
Methods
-
filter(
bool predicate(R), L orElse()) → Either< L, R> -
Available on Either<
Filters the right value with a predicate, converting to Left if falseL, R> , provided by the EitherExtensions extension -
flatMap<
R2> (Either< L, R2> f(R)) → Either<L, R2> -
Flat maps the right value if this is a Right
inherited
-
flatMapLeft<
L2> (Either< L2, R> f(L)) → Either<L2, R> -
Flat maps the left value if this is a Left
inherited
-
fold<
T> (T onLeft(L), T onRight(R)) → T -
Folds this Either into a single value
inherited
-
getOrElse(
R defaultValue) → R -
Returns the right value if this is a Right, otherwise returns the default value
inherited
-
getOrElseGet(
R defaultValue()) → R -
Returns the right value if this is a Right, otherwise computes and returns a default value
inherited
-
map<
R2> (R2 f(R)) → Either< L, R2> -
Maps the right value if this is a Right, otherwise returns this Left unchanged
inherited
-
mapLeft<
L2> (L2 f(L)) → Either< L2, R> -
Maps the left value if this is a Left, otherwise returns this Right unchanged
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
swap(
) → Either< R, L> -
Swaps Left and Right
inherited
-
toList(
) → List< R> -
Available on Either<
Converts this Either to a list, containing the right value or empty for LeftL, R> , provided by the EitherExtensions extension -
toNullable(
) → R? -
Available on Either<
Converts this Either to a nullable value, returning null for LeftL, R> , provided by the EitherExtensions extension -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override