Package 

Class Either

  • All Implemented Interfaces:

    
    public class Either<A extends Object, B extends Object>
    
                        

    Generic wrapper to store two mutually exclusive types.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private final A left
      private final B right
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final A getLeft()
      final B getRight()
      final Either<A, B> onLeft(Function1<A, Unit> action)
      final Either<A, B> onRight(Function1<B, Unit> action)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait