| Modifier and Type | Class | Description |
|---|---|---|
static class |
Either.Left<A,B> |
|
static class |
Either.Right<A,B> |
| Modifier and Type | Method | Description |
|---|---|---|
static <R> Either<java.lang.Exception,R> |
Try.either(CheckedSupplier<R> supplier) |
This method exists to allow usage of
either with checked suppliers
without casting or needing to declare the checked supplier explicitly. |
static <R> Either<java.lang.Exception,R> |
Try.either(java.util.function.Supplier<R> supplier) |
Wraps the call to
get in a try block. |
abstract Either<B,A> |
Either.flip() |
Flip an Either<A,B> to a Either<B,A>.
|
Either<B,A> |
Either.Left.flip() |
|
Either<B,A> |
Either.Right.flip() |
|
static <A,B> Either<A,B> |
Either.left(A left) |
Factory method for constructing lefts.
|
<X,Y> Either<X,Y> |
Either.Left.map(java.util.function.Function<A,X> leftFunction,
java.util.function.Function<B,Y> rightFunction) |
|
abstract <X,Y> Either<X,Y> |
Either.map(java.util.function.Function<A,X> leftFunction,
java.util.function.Function<B,Y> rightFunction) |
Map this Either<A,B> to a new Either<X,Y>.
|
<X,Y> Either<X,Y> |
Either.Right.map(java.util.function.Function<A,X> leftFunction,
java.util.function.Function<B,Y> rightFunction) |
|
static <A,B> Either<A,B> |
Either.right(B right) |
Factory method for constructing rights.
|
Copyright © 2018. All rights reserved.