Either<a extends Object?, b extends Object?> class abstract

Implemented types
Implementers
Available extensions

Constructors

Either.left(a _value)
const
factory
Either.right(b _value)
const
factory

Properties

hashCode int
The hash code for this object.
no setteroverride
maybeLeft Maybe<a>
Maybe return the Left value, returning None in case this is Right
no setterinherited
maybeRight Maybe<b>
Maybe return the Right value, returning None in case this is Left
no setterinherited
runtimeType SumRuntimeType
A representation of the runtime type of the object.
no setteroverride

Methods

apply(Either<E, T> arg) Either<E, U>

Available on Either<E, U Function(T)>, provided by the EitherApply extension

Apply the arg arg to this Function only in case both the arg and Function are available.
bimap<A1, B1>({required A1 a(a), required B1 b(b)}) Either<A1, B1>
inherited
bind<B1>(Either<a, B1> fn(b)) Either<a, B1>
Flat map the right value B into an Either<A, B1>, while keeping the left value untouched.
inherited
first<A1>(A1 fn(a)) Either<A1, b>
inherited
fmap<B1>(B1 fn(b p1)) Either<a, B1>
Map the right value B into an Either<A, B1>, while keeping the left value untouched.
inherited
getL(a right(b)) → a
Handle the right value with right and return the left A value.
inherited
getR(b left(a)) → b
Handle the left value with left and return the right B value.
inherited
lift<A, B>(Either<Exception, B Function(A)> fn, Either<Exception, A> a) Either<Exception, B>
inherited
liftEither<A1, B1, E1>(Either<E1, B1 Function(A1)> fn, Either<E1, A1> a) Either<E1, B1>
Perform the operation fn with the value A in a and wrap with Either<E1, B1> for pipelining.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pure<T>(T value) Either<a, T>
inherited
second<B1>(B1 fn(b)) Either<a, B1>
inherited
swap() Either<b, a>
inherited
toMaybe() Maybe<T>

Available on Either<Object, T>, provided by the EitherToMaybe extension

toString() String
A string representation of this object.
override
unit<T>(T value) Either<a, T>
inherited
visit<R extends Object?>({required R left(a _value), required R right(b _value)}) → R

Operators

operator ==(Object other) bool
The equality operator.
override
operator >>(Either<E, T> arg) Either<E, U>

Available on Either<E, U Function(T)>, provided by the EitherApply extension

Apply the arg arg to this Function only in case both the arg and Function are available.