LT - the left typeRT - the right typepublic class Either<LT,RT> extends Object
| Constructor and Description |
|---|
Either(Optional<LT> left,
Optional<RT> right) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object rhs) |
Either<RT,LT> |
flip() |
<T> T |
fold(Function<LT,T> withLeft,
Function<RT,T> withRight) |
int |
hashCode() |
Optional<LT> |
left() |
static <T1,T2> Either<T1,T2> |
left(T1 left) |
<LR,RR> Either<LR,RR> |
map(Function<LT,LR> withLeft,
Function<RT,RR> withRight) |
Optional<RT> |
right() |
static <T1,T2> Either<T1,T2> |
right(T2 right) |
String |
toString() |
Copyright © 2017. All rights reserved.