public class Either<L,R>
extends java.lang.Object
| 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) |
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) |
public static <L,R> Either<L,R> left(@Nonnull L left)
public static <L,R> Either<L,R> right(@Nonnull R right)
public static <T> T unwrap(Either<? extends T,? extends T> either)
public L getLeft()
public R getRight()
public boolean isLeft()
public boolean isRight()
public <ML,MR> Either<ML,MR> map(java.util.function.Function<L,ML> leftMapper, java.util.function.Function<R,MR> rightMapper)
public <T> T xmap(java.util.function.Function<L,T> leftMapper, java.util.function.Function<R,T> rightMapper)
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object