L - The type of the Left value of an Either.R - The type of the Right value of an Either.Either.swap() instead of projections.@Deprecated public static final class Either.RightProjection<L,R> extends Object implements Value<R>
| Modifier and Type | Method and Description |
|---|---|
<L2,R2> Either.RightProjection<L2,R2> |
bimap(Function<? super L,? extends L2> leftMapper,
Function<? super R,? extends R2> rightMapper)
Deprecated.
|
boolean |
equals(Object obj)
Deprecated.
Clarifies that values have a proper equals() method implemented.
|
Option<Either.RightProjection<L,R>> |
filter(Predicate<? super R> predicate)
Deprecated.
Returns
Some value 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.
|
R |
get()
Deprecated.
Gets the
Right value or throws. |
R |
getOrElse(R other)
Deprecated.
Gets the Right value or an alternate value, if the projected Either is a Left.
|
R |
getOrElseGet(Function<? super L,? extends R> other)
Deprecated.
Gets the Right value or an alternate value, if the projected Either is a Left.
|
<X extends Throwable> |
getOrElseThrow(Function<? super L,X> exceptionFunction)
Deprecated.
Gets the Right value or throws, if the projected Either is a Left.
|
int |
hashCode()
Deprecated.
Clarifies that values have a proper hashCode() method implemented.
|
boolean |
isAsync()
Deprecated.
A
RightProjection's value is computed synchronously. |
boolean |
isEmpty()
Deprecated.
Checks, this
Value is empty, i.e. |
boolean |
isLazy()
Deprecated.
A
RightProjection's value is computed eagerly. |
boolean |
isSingleValued()
Deprecated.
A
RightProjection is single-valued. |
Iterator<R> |
iterator()
Deprecated.
Returns a rich
io.vavr.collection.Iterator. |
<U> Either.RightProjection<L,U> |
map(Function<? super R,? extends U> mapper)
Deprecated.
Maps the right value if the projected Either is a Right.
|
Either.RightProjection<L,R> |
orElse(Either.RightProjection<? extends L,? extends R> other)
Deprecated.
|
Either.RightProjection<L,R> |
orElse(Supplier<? extends Either.RightProjection<? extends L,? extends R>> supplier)
Deprecated.
|
void |
orElseRun(Consumer<? super L> action)
Deprecated.
Runs an action in the case this is a projection on a Left value.
|
Either.RightProjection<L,R> |
peek(Consumer<? super R> action)
Deprecated.
Applies the given action to the value if the projected either is a Right.
|
String |
stringPrefix()
Deprecated.
Returns the name of this Value type, which is used by toString().
|
Either<L,R> |
toEither()
Deprecated.
Returns the underlying either of this projection.
|
String |
toString()
Deprecated.
Clarifies that values have a proper toString() method implemented.
|
<U> U |
transform(Function<? super Either.RightProjection<L,R>,? extends U> f)
Deprecated.
Transforms this
RightProjection. |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcollect, collect, contains, corresponds, eq, exists, forAll, forEach, getOrElse, getOrElseThrow, getOrElseTry, getOrNull, narrow, 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, toVectorpublic <L2,R2> Either.RightProjection<L2,R2> bimap(Function<? super L,? extends L2> leftMapper, Function<? super R,? extends R2> rightMapper)
public boolean isAsync()
RightProjection's value is computed synchronously.public boolean isEmpty()
ValueValue is empty, i.e. if the underlying value is absent.public boolean isLazy()
RightProjection's value is computed eagerly.public boolean isSingleValued()
RightProjection is single-valued.isSingleValued in interface Value<R>truepublic R get()
Right value or throws.get in interface Value<R>Either is a RightNoSuchElementException - if the underlying Either of this RightProjection is a Leftpublic Either.RightProjection<L,R> orElse(Either.RightProjection<? extends L,? extends R> other)
public Either.RightProjection<L,R> orElse(Supplier<? extends Either.RightProjection<? extends L,? extends R>> supplier)
public R getOrElse(R other)
getOrElse in interface Value<R>other - an alternative valueotherNoSuchElementException - if the underlying either of this RightProjection is a Leftpublic R getOrElseGet(Function<? super L,? extends R> other)
other - a function which converts a Left value to an alternative Right valueother by applying the Left value.public void orElseRun(Consumer<? super L> action)
action - an action which consumes a Left valuepublic <X extends Throwable> R getOrElseThrow(Function<? super L,X> exceptionFunction) throws X extends Throwable
X - a throwable typeexceptionFunction - a function which creates an exception based on a Left valueexceptionFunction by applying the Left value.X - if the projected Either is a LeftX extends Throwablepublic Either<L,R> toEither()
public Option<Either.RightProjection<L,R>> filter(Predicate<? super R> predicate)
Some value of type R if this is a right projection of a Right value and the predicate
applies to the underlying value.predicate - A predicatepublic <U> Either.RightProjection<L,U> flatMap(Function<? super R,? extends Either.RightProjection<L,? extends U>> mapper)
U - Component type of the mapped right valuemapper - A mapperRightProjection<L, U> if a Left is underlying, otherwise a the mapping result of the right value.NullPointerException - if mapper is nullpublic <U> Either.RightProjection<L,U> map(Function<? super R,? extends U> mapper)
public Either.RightProjection<L,R> peek(Consumer<? super R> action)
public <U> U transform(Function<? super Either.RightProjection<L,R>,? extends U> f)
RightProjection.U - Type of transformation resultf - A transformationUNullPointerException - if f is nullpublic Iterator<R> iterator()
Valueio.vavr.collection.Iterator.public boolean equals(Object obj)
Valuepublic int hashCode()
ValueSee Object.hashCode().
public String stringPrefix()
ValuestringPrefix in interface Value<R>public String toString()
ValueSee Object.toString().
Copyright © 2021. All Rights Reserved.