Package io.vavr.control
Class Either.Left<L,R>
java.lang.Object
io.vavr.control.Either.Left<L,R>
- Type Parameters:
L
- left component typeR
- right component type
- All Implemented Interfaces:
Either<L,
,R> Value<R>
,Serializable
,Iterable<R>
The
Left
version of an Either
.- Author:
- Daniel Dietrich
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.vavr.control.Either
Either.Left<L,
R>, Either.LeftProjection<L, R>, Either.Right<L, R>, Either.RightProjection<L, R> -
Method Summary
Modifier and TypeMethodDescriptionboolean
Clarifies that values have a proper equals() method implemented.get()
Gets the right value if this is aRight
or throws if this is aLeft
.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.Returns the name of this Value type, which is used by toString().toString()
Clarifies that values have a proper toString() method implemented.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.vavr.control.Either
bimap, filter, filterOrElse, flatMap, fold, getOrElseGet, getOrElseThrow, isAsync, isEmpty, isLazy, isSingleValued, iterator, left, map, mapLeft, orElse, orElse, orElseRun, peek, peekLeft, right, swap, toValidation
Methods inherited from interface io.vavr.Value
collect, collect, contains, corresponds, eq, exists, forAll, forEach, getOrElse, getOrElse, getOrElseThrow, getOrElseTry, getOrNull, 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
-
Method Details
-
get
Description copied from interface:Either
Gets the right value if this is aRight
or throws if this is aLeft
. -
getLeft
Description copied from interface:Either
Returns the left value. -
isLeft
public boolean isLeft()Description copied from interface:Either
Returns whether this Either is a Left. -
isRight
public boolean isRight()Description copied from interface:Either
Returns whether this Either is a Right. -
equals
Description copied from interface:Value
Clarifies that values have a proper equals() method implemented. -
hashCode
public int hashCode()Description copied from interface:Value
Clarifies that values have a proper hashCode() method implemented.See Object.hashCode().
-
stringPrefix
Description copied from interface:Value
Returns the name of this Value type, which is used by toString().- Specified by:
stringPrefix
in interfaceValue<L>
- Returns:
- This type name.
-
toString
Description copied from interface:Value
Clarifies that values have a proper toString() method implemented.See Object.toString().
-