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