L - type of left valueR - type of right valuepublic abstract class IEither<L,R>
extends java.lang.Object
implements java.lang.Iterable<R>
| Modifier and Type | Class and Description |
|---|---|
static class |
IEither.Left<L,R> |
static class |
IEither.Right<L,R> |
| Constructor and Description |
|---|
IEither() |
| Modifier and Type | Method and Description |
|---|---|
abstract <R2> IEither<L,R2> |
flatMap(IFunction<? super R,IEither<L,R2>> mapper) |
abstract IEither<L,R> |
ifLeft(IConsumer<L> fn) |
abstract IEither<L,R> |
ifRight(IConsumer<R> fn) |
boolean |
isDefined() |
abstract boolean |
isLeft() |
java.util.Iterator<R> |
iterator() |
abstract L |
left() |
static <L,R> IEither<L,R> |
left(L left) |
abstract <R2> IEither<L,R2> |
map(IFunction<? super R,R2> mapper) |
abstract <L2> IEither<L2,R> |
mapLeft(IFunction<? super L,L2> mapper) |
abstract R |
right() |
static <L,R> IEither<L,R> |
right(R right) |
abstract IList<R> |
toList() |
abstract IOption<R> |
toOption() |
abstract IOption<L> |
toOptionLeft() |
@NotNull public static <L,R> IEither<L,R> left(@NotNull L left)
@NotNull public static <L,R> IEither<L,R> right(@NotNull R right)
@Nullable public abstract L left()
@Nullable public abstract R right()
public abstract boolean isLeft()
public boolean isDefined()
@NotNull public java.util.Iterator<R> iterator()
iterator in interface java.lang.Iterable<R>@NotNull public abstract <L2> IEither<L2,R> mapLeft(@NotNull IFunction<? super L,L2> mapper)