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.- 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> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanClarifies that values have a proper equals() method implemented.get()Gets the right value if this is aRightor throws if this is aLeft.getLeft()Returns the left value.inthashCode()Clarifies that values have a proper hashCode() method implemented.booleanisLeft()Returns whether this Either is a Left.booleanisRight()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, waitMethods 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, toValidationMethods 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
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
value
-
-
Constructor Details
-
Left
Constructs aLeft.- Parameters:
value- a left value
-
-
Method Details
-
get
Description copied from interface:EitherGets the right value if this is aRightor throws if this is aLeft. -
getLeft
Description copied from interface:EitherReturns the left value. -
isLeft
public boolean isLeft()Description copied from interface:EitherReturns whether this Either is a Left. -
isRight
public boolean isRight()Description copied from interface:EitherReturns whether this Either is a Right. -
equals
Description copied from interface:ValueClarifies that values have a proper equals() method implemented. -
hashCode
public int hashCode()Description copied from interface:ValueClarifies that values have a proper hashCode() method implemented.See Object.hashCode().
-
stringPrefix
Description copied from interface:ValueReturns the name of this Value type, which is used by toString().- Specified by:
stringPrefixin interfaceValue<L>- Returns:
- This type name.
-
toString
Description copied from interface:ValueClarifies that values have a proper toString() method implemented.See Object.toString().
-