Class Either.RightProjection<L,R>
java.lang.Object
io.vavr.control.Either.RightProjection<L,R>
- Type Parameters:
L- The type of the Left value of an Either.R- The type of the Right value of an Either.
@Deprecated
public static final class Either.RightProjection<L,R>
extends Object
implements Value<R>
Deprecated.
A right projection of an Either.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<L2,R2> Either.RightProjection <L2, R2> Deprecated.booleanDeprecated.Clarifies that values have a proper equals() method implemented.Deprecated.ReturnsSomevalue of type R if this is a right projection of a Right value and the predicate applies to the underlying value.<U> Either.RightProjection<L, U> flatMap(Function<? super R, ? extends Either.RightProjection<L, ? extends U>> mapper) Deprecated.FlatMaps this RightProjection.get()Deprecated.Gets theRightvalue or throws.Deprecated.Gets the Right value or an alternate value, if the projected Either is a Left.getOrElseGet(Function<? super L, ? extends R> other) Deprecated.Gets the Right value or an alternate value, if the projected Either is a Left.getOrElseThrow(Function<? super L, X> exceptionFunction) Deprecated.Gets the Right value or throws, if the projected Either is a Left.inthashCode()Deprecated.Clarifies that values have a proper hashCode() method implemented.booleanisAsync()Deprecated.ARightProjection's value is computed synchronously.booleanisEmpty()Deprecated.Checks, thisValueis empty, i.e.booleanisLazy()Deprecated.ARightProjection's value is computed eagerly.booleanDeprecated.ARightProjectionis single-valued.iterator()Deprecated.Returns a richio.vavr.collection.Iterator.<U> Either.RightProjection<L, U> Deprecated.Maps the right value if the projected Either is a Right.orElse(Either.RightProjection<? extends L, ? extends R> other) Deprecated.orElse(Supplier<? extends Either.RightProjection<? extends L, ? extends R>> supplier) Deprecated.voidDeprecated.Runs an action in the case this is a projection on a Left value.Deprecated.Applies the given action to the value if the projected either is a Right.Deprecated.Returns the name of this Value type, which is used by toString().toEither()Deprecated.Returns the underlying either of this projection.toString()Deprecated.Clarifies that values have a proper toString() method implemented.<U> Utransform(Function<? super Either.RightProjection<L, R>, ? extends U> f) Deprecated.Transforms thisRightProjection.Methods inherited from interface Value
collect, collect, contains, corresponds, eq, exists, forAll, forEach, getOrElse, getOrElseThrow, getOrElseTry, getOrNull, out, out, spliterator, stderr, stdout, toArray, toCharSeq, toCompletableFuture, toEither, toEither, toInvalid, toInvalid, toJavaArray, toJavaArray, toJavaArray, toJavaCollection, toJavaList, toJavaList, toJavaMap, toJavaMap, toJavaMap, toJavaOptional, toJavaParallelStream, toJavaSet, toJavaSet, toJavaStream, toLeft, toLeft, toLinkedMap, toLinkedMap, toLinkedSet, toList, toMap, toMap, toOption, toPriorityQueue, toPriorityQueue, toQueue, toRight, toRight, toSet, toSortedMap, toSortedMap, toSortedMap, toSortedMap, toSortedSet, toSortedSet, toStream, toTree, toTree, toTry, toTry, toValid, toValid, toValidation, toValidation, toVector
-
Field Details
-
either
-
-
Constructor Details
-
RightProjection
-
-
Method Details
-
bimap
public <L2,R2> Either.RightProjection<L2,R2> bimap(Function<? super L, ? extends L2> leftMapper, Function<? super R, ? extends R2> rightMapper) Deprecated. -
isAsync
-
isEmpty
-
isLazy
-
isSingleValued
public boolean isSingleValued()Deprecated.ARightProjectionis single-valued.- Specified by:
isSingleValuedin interfaceValue<L>- Returns:
true
-
get
Deprecated.Gets theRightvalue or throws.- Specified by:
getin interfaceValue<L>- Returns:
- the right value, if the underlying
Eitheris aRight - Throws:
NoSuchElementException- if the underlyingEitherof thisRightProjectionis aLeft
-
orElse
Deprecated. -
orElse
public Either.RightProjection<L,R> orElse(Supplier<? extends Either.RightProjection<? extends L, ? extends R>> supplier) Deprecated. -
getOrElse
Deprecated.Gets the Right value or an alternate value, if the projected Either is a Left.- Specified by:
getOrElsein interfaceValue<L>- Parameters:
other- an alternative value- Returns:
- the right value, if the underlying Either is a Right or else
other - Throws:
NoSuchElementException- if the underlying either of this RightProjection is a Left
-
getOrElseGet
Deprecated.Gets the Right value or an alternate value, if the projected Either is a Left.- Parameters:
other- a function which converts a Left value to an alternative Right value- Returns:
- the right value, if the underlying Either is a Right or else the alternative Right value provided by
otherby applying the Left value.
-
orElseRun
-
getOrElseThrow
Deprecated.Gets the Right value or throws, if the projected Either is a Left.- Type Parameters:
X- a throwable type- Parameters:
exceptionFunction- a function which creates an exception based on a Left value- Returns:
- the right value, if the underlying Either is a Right or else throws the exception provided by
exceptionFunctionby applying the Left value. - Throws:
X- if the projected Either is a Left
-
toEither
-
filter
-
flatMap
public <U> Either.RightProjection<L,U> flatMap(Function<? super R, ? extends Either.RightProjection<L, ? extends U>> mapper) Deprecated.FlatMaps this RightProjection.- Type Parameters:
U- Component type of the mapped right value- Parameters:
mapper- A mapper- Returns:
- this as
RightProjection<L, U>if a Left is underlying, otherwise a the mapping result of the right value. - Throws:
NullPointerException- ifmapperis null
-
map
Deprecated.Maps the right value if the projected Either is a Right. -
peek
Deprecated.Applies the given action to the value if the projected either is a Right. Otherwise nothing happens. -
transform
Deprecated.Transforms thisRightProjection.- Type Parameters:
U- Type of transformation result- Parameters:
f- A transformation- Returns:
- An instance of type
U - Throws:
NullPointerException- iffis null
-
iterator
-
equals
Deprecated.Description copied from interface:ValueClarifies that values have a proper equals() method implemented. -
hashCode
-
stringPrefix
Deprecated.Description copied from interface:ValueReturns the name of this Value type, which is used by toString().- Specified by:
stringPrefixin interfaceValue<L>- Returns:
- This type name.
-
toString
-
Either.swap()instead of projections.