Interface Lens.Simple<S,A>

Type Parameters:
S - the type of both "larger" values
A - the type of both "smaller" values
All Superinterfaces:
Applicative<S,Lens<S,?,A,A>>, Contravariant<S,Profunctor<?,S,Lens<?,?,A,A>>>, Functor<S,Lens<S,?,A,A>>, Lens<S,S,A,A>, Monad<S,Lens<S,?,A,A>>, MonadRec<S,Lens<S,?,A,A>>, Optic<Cartesian<?,?,?>,Functor<?,?>,S,S,A,A>, Optic.Simple<Cartesian<?,?,?>,Functor<?,?>,S,A>, Profunctor<S,S,Lens<?,?,A,A>>
All Known Subinterfaces:
Schema<Values>
Enclosing interface:
Lens<S,T,A,B>
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface Lens.Simple<S,A> extends Lens<S,S,A,A>, Optic.Simple<Cartesian<?,?,?>,Functor<?,?>,S,A>
A convenience type with a simplified type signature for common lenses with both unified "larger" values and unified "smaller" values.
  • Method Details

    • andThen

      default <B> Lens.Simple<S,B> andThen(Optic.Simple<? super Cartesian<?,?,?>,? super Functor<?,?>,A,B> f)
      Compose two simple optics from left to right.
      Specified by:
      andThen in interface Optic.Simple<Cartesian<?,?,?>,Functor<?,?>,S,A>
      Type Parameters:
      B - the new left side and right side's functor embedding of the input profunctor
      Parameters:
      f - the other simple optic
      Returns:
      the composed simple optic
    • compose

      default <R> Lens.Simple<R,A> compose(Optic.Simple<? super Cartesian<?,?,?>,? super Functor<?,?>,R,S> g)
      Compose two simple optics from right to left.
      Specified by:
      compose in interface Optic.Simple<Cartesian<?,?,?>,Functor<?,?>,S,A>
      Type Parameters:
      R - the new left side and right side's functor embedding of the output profunctor
      Parameters:
      g - the other simple optic
      Returns:
      the composed simple optic
    • adapt

      static <S, A> Lens.Simple<S,A> adapt(Optic<? super Cartesian<?,?,?>,? super Functor<?,?>,S,S,A,A> lens)
      Adapt a Lens with the right variance to a Lens.Simple.
      Type Parameters:
      S - S/T
      A - A/B
      Parameters:
      lens - the lens
      Returns:
      the simple lens
    • both

      static <S, A, B> Lens.Simple<S,Tuple2<A,B>> both(Lens<S,S,A,A> f, Lens<S,S,B,B> g)
      Specialization of Lens.both(Lens, Lens) for simple lenses.
      Type Parameters:
      S - both lens larger values
      A - lens f smaller values
      B - lens g smaller values
      Parameters:
      f - the first lens
      g - the second lens
      Returns:
      the dual-focus simple lens