Package de.scravy.either

Do you know the Either type from Haskell? So this is the crippled Java version of it (an explicit sum type).

See: Description

Package de.scravy.either Description

Do you know the Either type from Haskell? So this is the crippled Java version of it (an explicit sum type).

Usage

   final Either<String, Exception> value = Either.left("Hello World!");
     if (value.isLeft()) {
       System.out.println(value.getLeft());
     }
   }
 

-or

   final Either<String, Exception> value = Either.left("Hello World!");
     if (value instanceof Either.Left) {
       System.out.println(value.getLeft());
     }
   }
 
Since:
1.0.0
Author:
Julian Fleischer

Copyright © 2015. All rights reserved.