L
- left component typeR
- right component typepublic static final class Either.Left<L,R> extends Object implements Either<L,R>, Serializable
Left
version of an Either
.Either.Left<L,R>, Either.LeftProjection<L,R>, Either.Right<L,R>, Either.RightProjection<L,R>
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Clarifies that values have a proper equals() method implemented.
|
R |
get()
Gets the right value if this is a
Right or throws if this is a Left . |
L |
getLeft()
Returns the left value.
|
int |
hashCode()
Clarifies that values have a proper hashCode() method implemented.
|
boolean |
isLeft()
Returns whether this Either is a Left.
|
boolean |
isRight()
Returns whether this Either is a Right.
|
String |
stringPrefix()
Returns the name of this Value type, which is used by toString().
|
String |
toString()
Clarifies that values have a proper toString() method implemented.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
bimap, filter, filterOrElse, flatMap, fold, getOrElseGet, getOrElseThrow, isAsync, isEmpty, isLazy, isSingleValued, iterator, left, left, map, mapLeft, narrow, orElse, orElse, orElseRun, peek, peekLeft, right, right, sequence, sequenceRight, swap, toValidation, traverse, traverseRight
collect, collect, contains, corresponds, eq, exists, forAll, forEach, getOrElse, 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, toVector
public R get()
Either
Right
or throws if this is a Left
.public boolean isLeft()
Either
public boolean isRight()
Either
public boolean equals(Object obj)
Value
public int hashCode()
Value
See Object.hashCode().
public String stringPrefix()
Value
stringPrefix
in interface Value<R>
public String toString()
Value
See Object.toString().
Copyright © 2021. All Rights Reserved.