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 java.lang.Object implements Value<L>
| Modifier and Type | Method and Description |
|---|---|
<L2,R2> Either.LeftProjection<L2,R2> |
bimap(java.util.function.Function<? super L,? extends L2> leftMapper,
java.util.function.Function<? super R,? extends R2> rightMapper)
Deprecated.
|
boolean |
equals(java.lang.Object obj)
Deprecated.
Clarifies that values have a proper equals() method implemented.
|
Option<Either.LeftProjection<L,R>> |
filter(java.util.function.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(java.util.function.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(java.util.function.Function<? super R,? extends L> other)
Deprecated.
Gets the Left value or an alternate value, if the projected Either is a Right.
|
<X extends java.lang.Throwable> |
getOrElseThrow(java.util.function.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(java.util.function.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(java.util.function.Supplier<? extends Either.LeftProjection<? extends L,? extends R>> supplier)
Deprecated.
|
void |
orElseRun(java.util.function.Consumer<? super R> action)
Deprecated.
Runs an action in the case this is a projection on a Right value.
|
Either.LeftProjection<L,R> |
peek(java.util.function.Consumer<? super L> action)
Deprecated.
Applies the given action to the value if the projected either is a Left.
|
java.lang.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.
|
java.lang.String |
toString()
Deprecated.
Clarifies that values have a proper toString() method implemented.
|
<U> U |
transform(java.util.function.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(java.util.function.Function<? super L,? extends L2> leftMapper, java.util.function.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.public Either.LeftProjection<L,R> orElse(Either.LeftProjection<? extends L,? extends R> other)
public Either.LeftProjection<L,R> orElse(java.util.function.Supplier<? extends Either.LeftProjection<? extends L,? extends R>> supplier)
public L getOrElse(L other)
public L getOrElseGet(java.util.function.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(java.util.function.Consumer<? super R> action)
action - an action which consumes a Right valuepublic <X extends java.lang.Throwable> L getOrElseThrow(java.util.function.Function<? super R,X> exceptionFunction) throws X extends java.lang.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 java.lang.Throwablepublic Either<L,R> toEither()
public Option<Either.LeftProjection<L,R>> filter(java.util.function.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(java.util.function.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.java.lang.NullPointerException - if mapper is nullpublic <U> Either.LeftProjection<U,R> map(java.util.function.Function<? super L,? extends U> mapper)
public Either.LeftProjection<L,R> peek(java.util.function.Consumer<? super L> action)
public <U> U transform(java.util.function.Function<? super Either.LeftProjection<L,R>,? extends U> f)
LeftProjection.U - Type of transformation resultf - A transformationUjava.lang.NullPointerException - if f is nullpublic Iterator<L> iterator()
Valueio.vavr.collection.Iterator.public boolean equals(java.lang.Object obj)
Valuepublic int hashCode()
ValueSee Object.hashCode().
public java.lang.String stringPrefix()
ValuestringPrefix in interface Value<L>public java.lang.String toString()
ValueSee Object.toString().