| Constructor and Description |
|---|
Either() |
| Modifier and Type | Method and Description |
|---|---|
abstract boolean |
isLeft()
Returns true if this is a Left, false otherwise.
|
abstract boolean |
isRight()
Returns true if this is a Right, false otherwise.
|
abstract Option<L> |
left()
Projects this Either as a Left.
|
abstract L |
mergeToLeft(Function1<R,L> rightToLeft)
Returns merged value to the Left type.
|
abstract R |
mergeToRight(Function1<L,R> leftToRight)
Returns merged value to the Right type.
|
abstract Option<R> |
right()
Projects this Either as a Right.
|
abstract Either<R,L> |
swap()
If this is a Left, then return the left value in Right or vice versa.
|
public abstract boolean isLeft()
public abstract boolean isRight()
public abstract Option<R> right()
public abstract Either<R,L> swap()
public abstract R mergeToRight(Function1<L,R> leftToRight)
leftToRight - Copyright © 2015. All rights reserved.