Class Optics

java.lang.Object
com.mojang.datafixers.optics.Optics

public abstract class Optics extends Object
  • Constructor Details

    • Optics

      public Optics()
  • Method Details

    • toAdapter

      public static <S, T, A, B> Adapter<S,T,A,B> toAdapter(Optic<? super Profunctor.Mu,S,T,A,B> optic)
    • toLens

      public static <S, T, A, B> Lens<S,T,A,B> toLens(Optic<? super Cartesian.Mu,S,T,A,B> optic)
    • toPrism

      public static <S, T, A, B> Prism<S,T,A,B> toPrism(Optic<? super Cocartesian.Mu,S,T,A,B> optic)
    • toAffine

      public static <S, T, A, B> Affine<S,T,A,B> toAffine(Optic<? super AffineP.Mu,S,T,A,B> optic)
    • toGetter

      public static <S, T, A, B> com.mojang.datafixers.optics.Getter<S,T,A,B> toGetter(Optic<? super GetterP.Mu,S,T,A,B> optic)
    • toTraversal

      public static <S, T, A, B> Traversal<S,T,A,B> toTraversal(Optic<? super TraversalP.Mu,S,T,A,B> optic)
    • id

      public static <S, T> Adapter<S,T,S,T> id()
    • isId

      public static boolean isId(Optic<?,?,?,?,?> optic)
    • adapter

      public static <S, T, A, B> Adapter<S,T,A,B> adapter(Function<S,A> from, Function<B,T> to)
    • lens

      public static <S, T, A, B> Lens<S,T,A,B> lens(Function<S,A> view, BiFunction<B,S,T> update)
    • prism

      public static <S, T, A, B> Prism<S,T,A,B> prism(Function<S,Either<T,A>> match, Function<B,T> build)
    • affine

      public static <S, T, A, B> Affine<S,T,A,B> affine(Function<S,Either<T,A>> preview, BiFunction<B,S,T> build)
    • getter

      public static <S, T, A, B> com.mojang.datafixers.optics.Getter<S,T,A,B> getter(Function<S,A> get)
    • forget

      public static <R, A, B> Forget<R,A,B> forget(Function<A,R> function)
    • forgetOpt

      public static <R, A, B> ForgetOpt<R,A,B> forgetOpt(Function<A,Optional<R>> function)
    • forgetE

      public static <R, A, B> com.mojang.datafixers.optics.ForgetE<R,A,B> forgetE(Function<A,Either<B,R>> function)
    • reForget

      public static <R, A, B> com.mojang.datafixers.optics.ReForget<R,A,B> reForget(Function<R,B> function)
    • grate

      public static <S, T, A, B> com.mojang.datafixers.optics.Grate<S,T,A,B> grate(FunctionType<FunctionType<FunctionType<S,A>,B>,T> grate)
    • reForgetEP

      public static <R, A, B> com.mojang.datafixers.optics.ReForgetEP<R,A,B> reForgetEP(String name, Function<Either<A,Pair<A,R>>,B> function)
    • reForgetE

      public static <R, A, B> com.mojang.datafixers.optics.ReForgetE<R,A,B> reForgetE(String name, Function<Either<A,R>,B> function)
    • reForgetP

      public static <R, A, B> com.mojang.datafixers.optics.ReForgetP<R,A,B> reForgetP(String name, BiFunction<A,R,B> function)
    • reForgetC

      public static <R, A, B> ReForgetC<R,A,B> reForgetC(String name, Either<Function<R,B>,BiFunction<A,R,B>> either)
    • pStore

      public static <I, J, X> com.mojang.datafixers.optics.PStore<I,J,X> pStore(Function<J,X> peek, Supplier<I> pos)
    • getFunc

      public static <A, B> Function<A,B> getFunc(App2<FunctionType.Mu,A,B> box)
    • proj1

      public static <F, G, F2> Proj1<F,G,F2> proj1()
    • isProj1

      public static boolean isProj1(Optic<?,?,?,?,?> optic)
    • proj2

      public static <F, G, G2> Proj2<F,G,G2> proj2()
    • isProj2

      public static boolean isProj2(Optic<?,?,?,?,?> optic)
    • inj1

      public static <F, G, F2> Inj1<F,G,F2> inj1()
    • isInj1

      public static boolean isInj1(Optic<?,?,?,?,?> optic)
    • inj2

      public static <F, G, G2> Inj2<F,G,G2> inj2()
    • isInj2

      public static boolean isInj2(Optic<?,?,?,?,?> optic)
    • eitherLens

      public static <F, G, F2, G2, A, B> Lens<Either<F,G>,Either<F2,G2>,A,B> eitherLens(Lens<F,F2,A,B> fLens, Lens<G,G2,A,B> gLens)
    • eitherAffine

      public static <F, G, F2, G2, A, B> Affine<Either<F,G>,Either<F2,G2>,A,B> eitherAffine(Affine<F,F2,A,B> fAffine, Affine<G,G2,A,B> gAffine)
    • eitherTraversal

      public static <F, G, F2, G2, A, B> Traversal<Either<F,G>,Either<F2,G2>,A,B> eitherTraversal(Traversal<F,F2,A,B> fOptic, Traversal<G,G2,A,B> gOptic)
    • listTraversal

      public static <A, B> ListTraversal<A,B> listTraversal()