Right<L, R> class
A class that represents the right value in an Either instance.
This class is used to indicate that an instance
of Either contains a right value of type R
.
Instances of Right are created using the
constructor and take a value of type R
as
a parameter.
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- isLeft → bool
-
A getter that returns a boolean indicating whether
the instance of Either is a Left instance.
no setteroverride
- isRight → bool
-
A getter that returns a boolean indicating whether
the instance of Either is a Right instance.
no setteroverride
- right → R
-
The right value of type
R
.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
fold<
T> (T leftFn(L l), T rightFn(R r)) → T -
A generic method that takes two functions,
leftFn
andrightFn
, as parameters.override -
leftOrNull(
) → L? -
Returns the value of the left property
if the Either instance is a Left instance, otherwise
returns
null
.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
rightOrNull(
) → R? -
Returns the value of the Right property
if the Either instance is a Right instance, otherwise
returns
null
.override -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override