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