Class EitherPrism

java.lang.Object
com.jnape.palatable.lambda.optics.prisms.EitherPrism

public final class EitherPrism extends Object
  • Constructor Details

    • EitherPrism

      private EitherPrism()
  • Method Details

    • _left

      public static <L, R> Prism.Simple<Either<L,R>,L> _left()
      A Prism that focuses on the left value of an Either.
      Type Parameters:
      L - the left type
      R - the right type
      Returns:
      the Prism
    • _right

      public static <L, R> Prism.Simple<Either<L,R>,R> _right()
      A Prism that focuses on the right value of an Either.
      Type Parameters:
      L - the left type
      R - the right type
      Returns:
      the Prism