public static class F.Either<L,R>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
java.util.Optional<L> |
left
The left value.
|
java.util.Optional<R> |
right
The right value.
|
Modifier and Type | Method and Description |
---|---|
static <L,R> F.Either<L,R> |
Left(L value)
Constructs a left side of the disjoint union, as opposed to the Right side.
|
static <L,R> F.Either<L,R> |
Right(R value)
Constructs a right side of the disjoint union, as opposed to the Left side.
|
java.lang.String |
toString() |
public final java.util.Optional<L> left
public final java.util.Optional<R> right
public static <L,R> F.Either<L,R> Left(L value)
value
- The value of the left sidepublic static <L,R> F.Either<L,R> Right(R value)
value
- The value of the right sidepublic java.lang.String toString()
toString
in class java.lang.Object