public interface Either<L,R>
| Modifier and Type | Interface and Description |
|---|---|
static class |
Either.Left<L,R> |
static class |
Either.Right<L,R> |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
L |
getLeft() |
R |
getRight() |
int |
hashCode() |
boolean |
isLeft() |
boolean |
isRight() |
static <L,R> Either<L,R> |
left(L left) |
<ML,MR> Either<ML,MR> |
map(java.util.function.Function<L,ML> leftMapper,
java.util.function.Function<R,MR> rightMapper) |
static <L,R> Either<L,R> |
right(R right) |
Either<R,L> |
swap() |
java.lang.String |
toString() |
static <T> T |
unwrap(Either<? extends T,? extends T> either) |
<T> T |
xmap(java.util.function.Function<L,T> leftMapper,
java.util.function.Function<R,T> rightMapper) |
static <L,R> Either<L,R> left(@Nonnull L left)
static <L,R> Either<L,R> right(@Nonnull R right)
static <T> T unwrap(Either<? extends T,? extends T> either)
L getLeft()
R getRight()
boolean isLeft()
boolean isRight()
<ML,MR> Either<ML,MR> map(java.util.function.Function<L,ML> leftMapper, java.util.function.Function<R,MR> rightMapper)
<T> T xmap(java.util.function.Function<L,T> leftMapper, java.util.function.Function<R,T> rightMapper)
java.lang.String toString()
toString in class java.lang.Objectboolean equals(java.lang.Object o)
equals in class java.lang.Objectint hashCode()
hashCode in class java.lang.Object