| Modifier and Type | Class and Description |
|---|---|
| public static class | |
| public static class |
| Modifier and Type | Method and Description |
|---|---|
| public default < type of the folded value U> U | |
| public R | |
| public L | |
| public default R | |
| public default boolean | |
| public boolean | |
| public boolean | |
| public static < Type of left value. L, Type of right value. R> Either | |
| public default < The new type of a Left value U> Either | |
| public default < Component type of the mapped right value U> Either | |
| public static < Type of left value. L, Type of right value. R> Either | |
| public default Either | Returns: a newEitherConverts a |
| fold | back to summary |
|---|---|
| public default <U> U fold(Function<? super L, ? extends U> leftMapper, Function<? super R, ? extends U> rightMapper) Folds either the left or the right side of this disjunction. | |
| get | back to summary |
|---|---|
| public R get() Gets the right value if this is a
| |
| getLeft | back to summary |
|---|---|
| public L getLeft() Returns the left value.
| |
| getOrNull | back to summary |
|---|---|
| public default R getOrNull() | |
| isEmpty | back to summary |
|---|---|
| public default boolean isEmpty() | |
| isLeft | back to summary |
|---|---|
| public boolean isLeft() Returns whether this Either is a Left.
| |
| isRight | back to summary |
|---|---|
| public boolean isRight() Returns whether this Either is a Right.
| |
| left | back to summary |
|---|---|
| public static <L, R> Either Constructs a
| |
| map | back to summary |
|---|---|
| public default <U> Either Maps the left value if the projected Either is a Left.
| |
| mapLeft | back to summary |
|---|---|
| public default <U> Either Maps the value of this Either if it is a Left, performs no operation if this is a Right.
| |
| right | back to summary |
|---|---|
| public static <L, R> Either Constructs a
| |
| swap | back to summary |
|---|---|
| public default Either Converts a
| |
Left version of an Either.
| Modifier and Type | Field and Description |
|---|---|
| private final L |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public R | get()
Implements io. Gets the right value if this is a |
| public L | |
| public boolean | isLeft()
Implements io. Returns whether this Either is a Left. |
| public boolean | isRight()
Implements io. Returns whether this Either is a Right. |
| value | back to summary |
|---|---|
| private final L value | |
| Left | back to summary |
|---|---|
| private Left(L value) Constructs a
| |
| get | back to summary |
|---|---|
| public R get() Implements io. Doc from io. Gets the right value if this is a
| |
| getLeft | back to summary |
|---|---|
| public L getLeft() Implements io. Doc from io. Returns the left value.
| |
| isLeft | back to summary |
|---|---|
| public boolean isLeft() Implements io. Doc from io. Returns whether this Either is a Left.
| |
| isRight | back to summary |
|---|---|
| public boolean isRight() Implements io. Doc from io. Returns whether this Either is a Right.
| |
Right version of an Either.
| Modifier and Type | Field and Description |
|---|---|
| private final R |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public R | get()
Implements io. Gets the right value if this is a |
| public L | |
| public boolean | isLeft()
Implements io. Returns whether this Either is a Left. |
| public boolean | isRight()
Implements io. Returns whether this Either is a Right. |
| value | back to summary |
|---|---|
| private final R value | |
| Right | back to summary |
|---|---|
| private Right(R value) Constructs a
| |
| get | back to summary |
|---|---|
| public R get() Implements io. Doc from io. Gets the right value if this is a
| |
| getLeft | back to summary |
|---|---|
| public L getLeft() Implements io. Doc from io. Returns the left value.
| |
| isLeft | back to summary |
|---|---|
| public boolean isLeft() Implements io. Doc from io. Returns whether this Either is a Left.
| |
| isRight | back to summary |
|---|---|
| public boolean isRight() Implements io. Doc from io. Returns whether this Either is a Right.
| |