play.libs
Class F.Either<A,B>

java.lang.Object
  extended by play.libs.F.Either<A,B>
Enclosing class:
F

public static class F.Either<A,B>
extends java.lang.Object

Represents a value of one of two possible types (a disjoint union)


Field Summary
 F.Option<A> left
          The left value.
 F.Option<B> right
          The right value.
 
Method Summary
static
<A,B> F.Either<A,B>
Left(A value)
          Constructs a left side of the disjoint union, as opposed to the Right side.
static
<A,B> F.Either<A,B>
Right(B value)
          Constructs a right side of the disjoint union, as opposed to the Left side.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

left

public final F.Option<A> left
The left value.


right

public final F.Option<B> right
The right value.

Method Detail

Left

public static <A,B> F.Either<A,B> Left(A value)
Constructs a left side of the disjoint union, as opposed to the Right side.


Right

public static <A,B> F.Either<A,B> Right(B value)
Constructs a right side of the disjoint union, as opposed to the Left side.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object