| Modifier and Type | Method and Description |
|---|---|
abstract <X> Either<X,R> |
Either.joinLeft(Function<L,Either<X,R>> leftJoiner)
Joins an Either through Left.
|
abstract <X> Either<L,X> |
Either.joinRight(Function<R,Either<L,X>> rightJoiner)
Joins an Either through Right.
|
static <L,R> Either<L,R> |
Either.left(L value) |
<X> Either<X,R> |
Either.LeftProjection.map(Function<L,X> mapper)
The given function is applied if this is a Left.
|
<X> Either<L,X> |
Either.RightProjection.map(Function<R,X> mapper)
The given function is applied if this is a Right.
|
Either<L,R> |
Either.LeftProjection.peek(Consumer<? super L> consumer)
Executes the given side-effecting function if this is a Left and returns this Either
|
Either<L,R> |
Either.RightProjection.peek(Consumer<? super R> consumer)
Executes the given side-effecting function if this is a Right and returns this Either
|
static <L,R> Either<L,R> |
Either.right(R value) |
Either<? extends Exception,T> |
Success.toEither() |
Either<? extends Exception,T> |
Failure.toEither() |
abstract <X extends Exception> |
Try.toEither()
Creates an Either where the Left is the Failure and Right is the Success from this Try
|
| Modifier and Type | Method and Description |
|---|---|
Optional<Either<L,R>> |
Either.LeftProjection.filter(Predicate<L> predicate) |
Optional<Either<L,R>> |
Either.RightProjection.filter(Predicate<R> predicate) |
| Modifier and Type | Method and Description |
|---|---|
abstract <X> Either<X,R> |
Either.joinLeft(Function<L,Either<X,R>> leftJoiner)
Joins an Either through Left.
|
abstract <X> Either<L,X> |
Either.joinRight(Function<R,Either<L,X>> rightJoiner)
Joins an Either through Right.
|
static <L,R> Pair<List<L>,List<R>> |
Pair.of(List<Either<L,R>> collection)
Given a list of Either[L,R] that can be a mixed collection of Left and Right, groups left side values into one list and
right side values into another list and return both lists together as a Pair (makes a union of the values contained within a
collection of disjoint unions)
|
Copyright © 2014–2016. All rights reserved.