Class Over<S,T,A,B>

java.lang.Object
com.jnape.palatable.lambda.optics.functions.Over<S,T,A,B>
Type Parameters:
S - the type of the larger value
T - the type of the larger updated value
A - the type of the smaller retrieving value
B - the type of the smaller setting value
All Implemented Interfaces:
Fn1<Optic<? super Fn1<?,?>,? super Identity<?>,S,T,A,B>,Fn1<Fn1<? super A,? extends B>,Fn1<S,T>>>, Fn2<Optic<? super Fn1<?,?>,? super Identity<?>,S,T,A,B>,Fn1<? super A,? extends B>,Fn1<S,T>>, Fn3<Optic<? super Fn1<?,?>,? super Identity<?>,S,T,A,B>,Fn1<? super A,? extends B>,S,T>, Applicative<Fn1<Fn1<? super A,? extends B>,Fn1<S,T>>,Fn1<Optic<? super Fn1<?,?>,? super Identity<?>,S,T,A,B>,?>>, Cartesian<Optic<? super Fn1<?,?>,? super Identity<?>,S,T,A,B>,Fn1<Fn1<? super A,? extends B>,Fn1<S,T>>,Fn1<?,?>>, Cocartesian<Optic<? super Fn1<?,?>,? super Identity<?>,S,T,A,B>,Fn1<Fn1<? super A,? extends B>,Fn1<S,T>>,Fn1<?,?>>, Contravariant<Optic<? super Fn1<?,?>,? super Identity<?>,S,T,A,B>,Profunctor<?,Fn1<Fn1<? super A,? extends B>,Fn1<S,T>>,Fn1<?,?>>>, Functor<Fn1<Fn1<? super A,? extends B>,Fn1<S,T>>,Fn1<Optic<? super Fn1<?,?>,? super Identity<?>,S,T,A,B>,?>>, Profunctor<Optic<? super Fn1<?,?>,? super Identity<?>,S,T,A,B>,Fn1<Fn1<? super A,? extends B>,Fn1<S,T>>,Fn1<?,?>>, Monad<Fn1<Fn1<? super A,? extends B>,Fn1<S,T>>,Fn1<Optic<? super Fn1<?,?>,? super Identity<?>,S,T,A,B>,?>>, MonadReader<Optic<? super Fn1<?,?>,? super Identity<?>,S,T,A,B>,Fn1<Fn1<? super A,? extends B>,Fn1<S,T>>,Fn1<Optic<? super Fn1<?,?>,? super Identity<?>,S,T,A,B>,?>>, MonadRec<Fn1<Fn1<? super A,? extends B>,Fn1<S,T>>,Fn1<Optic<? super Fn1<?,?>,? super Identity<?>,S,T,A,B>,?>>, MonadWriter<Optic<? super Fn1<?,?>,? super Identity<?>,S,T,A,B>,Fn1<Fn1<? super A,? extends B>,Fn1<S,T>>,Fn1<Optic<? super Fn1<?,?>,? super Identity<?>,S,T,A,B>,?>>

public final class Over<S,T,A,B> extends Object implements Fn3<Optic<? super Fn1<?,?>,? super Identity<?>,S,T,A,B>,Fn1<? super A,? extends B>,S,T>
Given an Optic, a function from A to B, and a "larger" value S, produce a T by retrieving the A from the S, applying the function, and updating the S with the B resulting from the function.

This function is similar to Set, except that it allows the setting value B to be derived from S via function application, rather than provided.

See Also:
  • Field Details

    • INSTANCE

      private static final Over<?,?,?,?> INSTANCE
  • Constructor Details

    • Over

      private Over()
  • Method Details

    • checkedApply

      public T checkedApply(Optic<? super Fn1<?,?>,? super Identity<?>,S,T,A,B> optic, Fn1<? super A,? extends B> fn, S s)
      Specified by:
      checkedApply in interface Fn3<S,T,A,B>
    • over

      public static <S, T, A, B> Over<S,T,A,B> over()
    • over

      public static <S, T, A, B> Fn2<Fn1<? super A,? extends B>,S,T> over(Optic<? super Fn1<?,?>,? super Identity<?>,S,T,A,B> optic)
    • over

      public static <S, T, A, B> Fn1<S,T> over(Optic<? super Fn1<?,?>,? super Identity<?>,S,T,A,B> optic, Fn1<? super A,? extends B> fn)
    • over

      public static <S, T, A, B> T over(Optic<? super Fn1<?,?>,? super Identity<?>,S,T,A,B> optic, Fn1<? super A,? extends B> fn, S s)