Uses of Interface
io.vavr.control.Either
Packages that use Either
Package
Description
Beside
API
the io.vavr package contains core types like (Checked)Functions and Tuples.-
Uses of Either in io.vavr
Modifier and TypeMethodDescriptionConverts this to anEither
.Value.toEither
(L left) Converts this to anEither
.Deprecated.Value.toLeft
(R right) Deprecated.UseValue.toEither(Object)
instead.Deprecated.UseValue.toEither(Supplier)
instead.Value.toRight
(L left) Deprecated.UseValue.toEither(Object)
instead. -
Uses of Either in io.vavr.control
Classes in io.vavr.control that implement EitherModifier and TypeClassDescriptionstatic final class
Either.Left<L,
R> TheLeft
version of anEither
.static final class
Either.Right<L,
R> TheRight
version of anEither
.Fields in io.vavr.control declared as EitherModifier and TypeFieldDescriptionEither.LeftProjection.either
Deprecated.Either.RightProjection.either
Deprecated.Methods in io.vavr.control that return EitherModifier and TypeMethodDescriptiondefault <X,
Y> Either <X, Y> Either.bimap
(Function<? super L, ? extends X> leftMapper, Function<? super R, ? extends Y> rightMapper) Maps either the left or the right side of this disjunction.Filters this right-biasedEither
by testing a predicate.FlatMaps this right-biased Either.static <L,
R> Either <L, R> Either.left
(L left) Constructs aEither.Left
Maps the value of this Either if it is a Right, performs no operation if this is a Left.Maps the value of this Either if it is a Left, performs no operation if this is a Right.static <L,
R> Either <L, R> Narrows a widenedEither<? extends L, ? extends R>
toEither<L, R>
by performing a type-safe cast.static <L,
R> Either <L, R> Either.right
(R right) Constructs aEither.Right
Reduces manyEither
s into a singleEither
by transforming anIterable<Either<L, R>>
into aEither<Seq<L>, Seq<R>>
.Either.sequenceRight
(Iterable<? extends Either<? extends L, ? extends R>> eithers) Reduces manyEither
s into a singleEither
by transforming anIterable<Either<L, R>>
into aEither<L, Seq<R>>
.Either.swap()
Converts aLeft
to aRight
vice versa by wrapping the value in a new type.Either.LeftProjection.toEither()
Deprecated.Returns the underlying either of this projection.Either.RightProjection.toEither()
Deprecated.Returns the underlying either of this projection.Try.toEither()
Converts thisTry
to anEither
.Validation.toEither()
Converts this Validation to anEither
.Either.traverse
(Iterable<? extends T> values, Function<? super T, ? extends Either<? extends L, ? extends R>> mapper) Maps the values of an iterable to a sequence of mapped values into a singleEither
by transforming anIterable<? extends T>
into aEither<Seq<U>>
.Either.traverseRight
(Iterable<? extends T> values, Function<? super T, ? extends Either<? extends L, ? extends R>> mapper) Maps the values of an iterable to a sequence of mapped values into a singleEither
by transforming anIterable<? extends T>
into aEither<Seq<U>>
.Methods in io.vavr.control that return types with arguments of type EitherModifier and TypeMethodDescriptionFilters this right-biasedEither
by testing a predicate.Methods in io.vavr.control with parameters of type EitherModifier and TypeMethodDescriptionstatic <E,
T> Validation <E, T> Validation.fromEither
(Either<E, T> either) Creates aValidation
of anEither
.static <L,
R> Either <L, R> Narrows a widenedEither<? extends L, ? extends R>
toEither<L, R>
by performing a type-safe cast.Method parameters in io.vavr.control with type arguments of type EitherModifier and TypeMethodDescriptionFlatMaps this right-biased Either.Reduces manyEither
s into a singleEither
by transforming anIterable<Either<L, R>>
into aEither<Seq<L>, Seq<R>>
.Either.sequenceRight
(Iterable<? extends Either<? extends L, ? extends R>> eithers) Reduces manyEither
s into a singleEither
by transforming anIterable<Either<L, R>>
into aEither<L, Seq<R>>
.Either.traverse
(Iterable<? extends T> values, Function<? super T, ? extends Either<? extends L, ? extends R>> mapper) Maps the values of an iterable to a sequence of mapped values into a singleEither
by transforming anIterable<? extends T>
into aEither<Seq<U>>
.Either.traverseRight
(Iterable<? extends T> values, Function<? super T, ? extends Either<? extends L, ? extends R>> mapper) Maps the values of an iterable to a sequence of mapped values into a singleEither
by transforming anIterable<? extends T>
into aEither<Seq<U>>
.Constructors in io.vavr.control with parameters of type EitherModifierConstructorDescriptionprivate
LeftProjection
(Either<L, R> either) Deprecated.private
RightProjection
(Either<L, R> either) Deprecated.
Value.toEither(Supplier)
instead.