Right<L, R> class final

Represents a success case.

Two Rights are equal when they have exactly the same runtime type (including type arguments) and equal values, so == is symmetric.

Inheritance
Available extensions

Constructors

Right(R value)
Creates a Right with the given value.
const

Properties

hashCode → int
The hash code for this object.
no setteroverride
isLeft → bool

Available on Either<L, R>, provided by the EitherExtensions extension

Returns true if this is a Left.
no setter
isRight → bool

Available on Either<L, R>, provided by the EitherExtensions extension

Returns true if this is a Right.
no setter
left → L?

Available on Either<L, R>, provided by the EitherExtensions extension

Returns the Left value if present, otherwise null.
no setter

Available on Either<L, R>, provided by the EitherExtensions extension

Returns the Right value if present, otherwise null.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
value → R
The success value held by this Right.
final

Methods

fold<T>(T leftFn(L l), T rightFn(R r)) → T
Applies leftFn if this is a Left, or rightFn if this is a Right.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

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