se.chalmers.cs.gf.util
Class Either<A,B>

java.lang.Object
  extended by se.chalmers.cs.gf.util.Either<A,B>

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

A simple variant type.


Method Summary
 A getLeft()
           
 B getRight()
           
 boolean isLeft()
           
static
<A,B> Either<A,B>
mkLeft(A x)
           
static
<A,B> Either<A,B>
mkRight(B x)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isLeft

public boolean isLeft()

getLeft

public A getLeft()

getRight

public B getRight()

mkLeft

public static <A,B> Either<A,B> mkLeft(A x)

mkRight

public static <A,B> Either<A,B> mkRight(B x)