Either.Left<A,B>, Either.Right<A,B>| Modifier and Type | Method | Description |
|---|---|---|
boolean |
equals(java.lang.Object obj) |
|
Either<B,A> |
flip() |
Flip an Either<A,B> to a Either<B,A>.
|
A |
getLeft() |
|
B |
getRight() |
|
int |
hashCode() |
|
<X,Y> Either<X,Y> |
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>.
|
<T> T |
reduce(java.util.function.Function<A,T> leftFunction,
java.util.function.Function<B,T> rightFunction) |
Reduce an Either<A,B> to a single value type T.
|
java.lang.String |
toString() |
|
void |
use(java.util.function.Consumer<A> leftConsumer,
java.util.function.Consumer<B> rightConsumer) |
Pass the value of this either to a consumer.
|
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic void use(java.util.function.Consumer<A> leftConsumer, java.util.function.Consumer<B> rightConsumer)
Eitherpublic <X,Y> Either<X,Y> map(java.util.function.Function<A,X> leftFunction, java.util.function.Function<B,Y> rightFunction)
Eitherpublic <T> T reduce(java.util.function.Function<A,T> leftFunction, java.util.function.Function<B,T> rightFunction)
EitherCopyright © 2018. All rights reserved.