Package com.atlassian.upm.api.util
Class Either<L,R>
java.lang.Object
com.atlassian.upm.api.util.Either<L,R>
- Type Parameters:
L- the type of value stored leftR- the type of value stored right
A disjoint union type typically used as an alternative to
Option where by convention the
left value contains an error and the right is akin to "some".-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic final class -
Method Summary
Modifier and TypeMethodDescriptionabstract <Z> Zstatic <L,R> Iterable<L> static <L,R> Iterable<R> final booleanisLeft()final booleanisRight()final Either.LeftProjection<L,R> left()static <L,R> Either<L, R> left(L left) final Either.RightProjection<L,R> right()static <L,R> Either<L, R> right(R right)
-
Method Details
-
left
-
right
-
fold
-
left
-
right
-
isLeft
public final boolean isLeft() -
isRight
public final boolean isRight() -
getLefts
-
getRights
-