Right<L, R> class

Inheritance
Available extensions

Constructors

const

Properties

asZIO ZIO<NoEnv, L, R>
no setteroverride
hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value → R
Extract the value of type R inside the Right.
no setter

Methods

alt(covariant Either<L, R> orElse()) Either<L, R>
Return the current Either if it is a Right, otherwise return the result of orElse.
override
andThen<R2>(covariant Either<L, R2> then()) Either<L, R2>
If this Either is a Right, then return the result of calling then. Otherwise return Left.
inherited
ap<C>(covariant Either<L, C Function(R r)> a) Either<L, C>
Apply the function contained inside a to change the value on the Right from type R to a value of type C.
inherited
bimap<C, D>(C mLeft(L l), D mRight(R b)) Either<C, D>
Define two functions to change both the Left and Right value of the Either.
inherited
bind<R2>(Either<L, R2> f(R r)) Either<L, R2>
Used to chain multiple functions that return a Either.
inherited
call<B>(covariant Either<L, B> chain) Either<L, B>
Chain multiple functions having the same left type L.
inherited
chainFirst<C>(covariant Either<L, C> chain(R b)) Either<L, R>
Chain a request that returns another Either, execute it, ignore the result, and return the same value as the current Either.
inherited
duplicate() Either<L, Either<L, R>>
Wrap this Either inside another Either.
inherited
extend<Z>(Z f(Either<L, R> t)) Either<L, Z>
Change the value of Either from type R to type Z based on the value of Either<L, R> using function f.
override
filterOrElse(bool f(R r), L onFalse(R r)) Either<L, R>
If f applied on this Either as Right returns true, then return this Either. If it returns false, return the result of onFalse in a Left.
inherited
flatMap<C>(covariant Either<L, C> f(R a)) Either<L, C>
Used to chain multiple functions that return a Either.
override
getLeft() Option<L>
Extract the value from Left in a Option.
override
getOrElse(R orElse(L l)) → R
Return the value inside this Either if it is a Right. Otherwise return result of onElse.
override
getRight() Option<R>
Extract the value from Right in a Option.
inherited
isLeft() bool
Return true when this Either is Left.
override
isRight() bool
Return true when this Either is Right.
override
map<C>(C f(R a)) Either<L, C>
If the Either is Right, then change its value from type R to type C using function f.
override
map2<C, D>(covariant Either<L, C> m1, D f(R b, C c)) Either<L, D>
Change type of this Either based on its value of type R and the value of type C of another Either.
override
map3<C, D, E>(covariant Either<L, C> m1, covariant Either<L, D> m2, E f(R b, C c, D d)) Either<L, E>
Change type of this Either based on its value of type R, the value of type C of a second Either, and the value of type D of a third Either.
override
mapLeft<C>(C f(L a)) Either<C, R>
If the Either is Left, then change its value from type L to type C using function f.
override
match<C>(C onLeft(L l), C onRight(R r)) → C
Execute onLeft when value is Left, otherwise execute onRight.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
orElse<L1>(Either<L1, R> onLeft(L l)) Either<L1, R>
If this Either is Left, return the result of onLeft.
override
swap() Either<R, L>
Swap the values contained inside the Left and Right of this Either.
override
toNullable() → R?
Convert Either to nullable R?.
override
toOption() Option<R>
Convert this Either to a Option:
override
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override