Module odo.core

Class Either<T,​K>

java.lang.Object
net.odoframework.util.Either<T,​K>

public abstract class Either<T,​K>
extends Object
  • Constructor Details

    • Either

      public Either()
  • Method Details

    • left

      public static final <T,​ K> Either<T,​K> left​(T value)
    • right

      public static final <T,​ K> Either<T,​K> right​(K value)
    • isLeft

      public boolean isLeft()
    • left

      public T left()
    • right

      public K right()
    • mapLeft

      public <Z> Optional<Z> mapLeft​(Function<T,​Z> handler)
    • mapRight

      public <Z> Optional<Z> mapRight​(Function<K,​Z> handler)