Class Overview
A disjoint union type typically used as an alternative to Option where by convention the
left value contains an error and the right is akin to "some".
Summary
| Nested Classes |
|
class |
Either.LeftProjection<L, R> |
|
|
class |
Either.RightProjection<L, R> |
|
| Public Methods |
|
abstract
<Z>
Z
|
fold(Function<L, Z> l, Function<R, Z> r)
|
|
static
<L, R>
Iterable<L>
|
getLefts(Iterable<Either<L, R>> all)
|
|
static
<L, R>
Iterable<R>
|
getRights(Iterable<Either<L, R>> all)
|
|
final
boolean
|
isLeft()
|
|
final
boolean
|
isRight()
|
|
final
LeftProjection<L, R>
|
left()
|
|
static
<L, R>
Either<L, R>
|
left(L left)
|
|
final
RightProjection<L, R>
|
right()
|
|
static
<L, R>
Either<L, R>
|
right(R right)
|
|
[Expand]
Inherited Methods |
From class
java.lang.Object
|
Object
|
clone()
|
|
boolean
|
equals(Object arg0)
|
|
void
|
finalize()
|
|
final
Class<?>
|
getClass()
|
|
int
|
hashCode()
|
|
final
void
|
notify()
|
|
final
void
|
notifyAll()
|
|
String
|
toString()
|
|
final
void
|
wait(long arg0, int arg1)
|
|
final
void
|
wait(long arg0)
|
|
final
void
|
wait()
|
|
Public Methods
public
abstract
Z
fold
(Function<L, Z> l, Function<R, Z> r)
public
final
boolean
isLeft
()
public
final
boolean
isRight
()
public
static
Either<L, R>
left
(L left)
public
static
Either<L, R>
right
(R right)