L - left component typeR - right component typepublic static final class Either.Right<L,R> extends Object implements Either<L,R>, Serializable
Right 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, waitbimap, 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, traverseRightcollect, 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, toVectorpublic R get()
EitherRight or throws if this is a Left.public boolean isLeft()
Eitherpublic boolean isRight()
Eitherpublic 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 © 2019. All Rights Reserved.