@Test public void right() { EitherK<Option_, Try_, String> right = EitherK.right(Try.success("hello")); assertAll( () -> assertFalse(right.isLeft()), () -> assertTrue(right.isRight()), () -> assertEquals(Try.success("hello"), right.getRight()), () -> assertThrows(NoSuchElementException.class, right::getLeft) ); }
public static <F extends Witness, G extends Witness, T> EitherK<F, G, T> right(Kind<G, T> right) { return new EitherK<>(Either.right(right)); }
EitherK implements EitherKOf<F, G, T>, Serializable { public static <F extends Witness, G extends Witness, T> EitherK<F, G, T> right(Kind<G, T> right) { return new EitherK<>(Either.right(right)); } }
EitherK implements EitherKOf<F, G, T>, Serializable { public static <F extends Witness, G extends Witness, T> EitherK<F, G, T> right(Kind<G, T> right) { return new EitherK<>(Either.right(right)); } private  EitherK(Either<Kind<F, T>, Kind<G, T>> either); }
EitherK implements EitherKOf<F, G, T>, Serializable { public static <F extends Witness, G extends Witness, T> EitherK<F, G, T> right(Kind<G, T> right) { return new EitherK<>(Either.right(right)); } private  EitherK(Either<Kind<F, T>, Kind<G, T>> either); EitherK<F, G, R> map(Functor<F> functorF, Functor<G> functorG, Function1<? super T, ? extends R> mapper); EitherK<F, X, T> mapK(FunctionK<G, X> mapper); EitherK<X, G, T> mapLeftK(FunctionK<F, X> mapper); Kind<R, T> foldK(FunctionK<F, R> left, FunctionK<G, R> right); EitherK<F, G, R> coflatMap(
      Comonad<F> comonadF, Comonad<G> comonadG, 
      Function1<? super EitherK<F, G, ? extends T>, ? extends R> mapper); T extract(Comonad<F> comonadF, Comonad<G> comonadG); EitherK<F, G, R> contramap(Contravariant<F> contravariantF, 
      Contravariant<G> contravariantG, Function1<? super R, ? extends T> contramap); EitherK<G, F, T> swap(); boolean isLeft(); boolean isRight(); Kind<F, T> getLeft(); Kind<G, T> getRight(); static EitherK<F, G, T> left(Kind<F, T> left); static EitherK<F, G, T> right(Kind<G, T> right); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); }
EitherK implements EitherKOf<F, G, T>, Serializable { public static <F extends Witness, G extends Witness, T> EitherK<F, G, T> right(Kind<G, T> right) { return new EitherK<>(Either.right(right)); } private  EitherK(Either<Kind<F, T>, Kind<G, T>> either); EitherK<F, G, R> map(Functor<F> functorF, Functor<G> functorG, Function1<? super T, ? extends R> mapper); EitherK<F, X, T> mapK(FunctionK<G, X> mapper); EitherK<X, G, T> mapLeftK(FunctionK<F, X> mapper); Kind<R, T> foldK(FunctionK<F, R> left, FunctionK<G, R> right); EitherK<F, G, R> coflatMap(
      Comonad<F> comonadF, Comonad<G> comonadG, 
      Function1<? super EitherK<F, G, ? extends T>, ? extends R> mapper); T extract(Comonad<F> comonadF, Comonad<G> comonadG); EitherK<F, G, R> contramap(Contravariant<F> contravariantF, 
      Contravariant<G> contravariantG, Function1<? super R, ? extends T> contramap); EitherK<G, F, T> swap(); boolean isLeft(); boolean isRight(); Kind<F, T> getLeft(); Kind<G, T> getRight(); static EitherK<F, G, T> left(Kind<F, T> left); static EitherK<F, G, T> right(Kind<G, T> right); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }