public abstract class Either<L,R> extends Object implements Serializable
| Modifier and Type | Class and Description |
|---|---|
static class |
Either.Left<L,R> |
static class |
Either.Right<L,R> |
| Constructor and Description |
|---|
Either() |
| Modifier and Type | Method and Description |
|---|---|
abstract boolean |
isLeft() |
abstract L |
left() |
static <L,R> Either.Left<L,R> |
left(L value) |
static <L,R> Either<L,R> |
leftOrRight(L left,
R right) |
static <L,R> Either<L,R> |
leftOrRight(L left,
R right,
String errorMessage) |
abstract R |
right() |
static <L,R> Either.Right<L,R> |
right(R value) |
public abstract boolean isLeft()
public abstract L left()
public abstract R right()
public static <L,R> Either.Left<L,R> left(L value)
public static <L,R> Either.Right<L,R> right(R value)
public static <L,R> Either<L,R> leftOrRight(L left, R right)
Copyright © 2014. All Rights Reserved.