Class Optics
java.lang.Object
com.mojang.datafixers.optics.Optics
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <S,T, A, B> Adapter <S, T, A, B> static <S,T, A, B> Affine <S, T, A, B> affine(Function<S, Either<T, A>> preview, BiFunction<B, S, T> build) eitherAffine(Affine<F, F2, A, B> fAffine, Affine<G, G2, A, B> gAffine) eitherLens(Lens<F, F2, A, B> fLens, Lens<G, G2, A, B> gLens) eitherTraversal(Traversal<F, F2, A, B> fOptic, Traversal<G, G2, A, B> gOptic) static <R,A, B> Forget <R, A, B> static <R,A, B> ForgetE <R, A, B> static <R,A, B> ForgetOpt <R, A, B> static <A,B> Function <A, B> getFunc(App2<FunctionType.Mu, A, B> box) static <S,T, A, B> Getter <S, T, A, B> static <S,T, A, B> Grate <S, T, A, B> grate(FunctionType<FunctionType<FunctionType<S, A>, B>, T> grate) static <S,T> Adapter <S, T, S, T> id()static <F,G, F2> Inj1 <F, G, F2> inj1()static <F,G, G2> Inj2 <F, G, G2> inj2()static booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic <S,T, A, B> Lens <S, T, A, B> lens(Function<S, A> view, BiFunction<B, S, T> update) static <A,B> ListTraversal <A, B> static <S,T, A, B> Prism <S, T, A, B> static <F,G, F2> Proj1 <F, G, F2> proj1()static <F,G, G2> Proj2 <F, G, G2> proj2()static <I,J, X> PStore <I, J, X> static <R,A, B> ReForget <R, A, B> static <R,A, B> ReForgetC <R, A, B> reForgetC(String name, Either<Function<R, B>, BiFunction<A, R, B>> either) static <R,A, B> ReForgetE <R, A, B> static <R,A, B> ReForgetEP <R, A, B> reForgetEP(String name, Function<Either<A, Pair<A, R>>, B> function) static <R,A, B> ReForgetP <R, A, B> reForgetP(String name, BiFunction<A, R, B> function) static <S,T, A, B> Adapter <S, T, A, B> toAdapter(Optic<? super Profunctor.Mu, S, T, A, B> optic) static <S,T, A, B> Affine <S, T, A, B> toAffine(Optic<? super AffineP.Mu, S, T, A, B> optic) static <S,T, A, B> Getter <S, T, A, B> toGetter(Optic<? super GetterP.Mu, S, T, A, B> optic) static <S,T, A, B> Lens <S, T, A, B> toLens(Optic<? super Cartesian.Mu, S, T, A, B> optic) static <S,T, A, B> Prism <S, T, A, B> toPrism(Optic<? super Cocartesian.Mu, S, T, A, B> optic) static <S,T, A, B> Traversal <S, T, A, B> toTraversal(Optic<? super TraversalP.Mu, S, T, A, B> optic)
-
Constructor Details
-
Optics
public Optics()
-
-
Method Details
-
toAdapter
-
toLens
-
toPrism
-
toAffine
-
toGetter
-
toTraversal
public static <S,T, Traversal<S,A, B> T, toTraversalA, B> (Optic<? super TraversalP.Mu, S, T, A, B> optic) -
merge
-
id
-
isId
-
adapter
-
lens
-
prism
-
affine
public static <S,T, Affine<S,A, B> T, affineA, B> (Function<S, Either<T, A>> preview, BiFunction<B, S, T> build) -
getter
-
forget
-
forgetOpt
-
forgetE
-
reForget
-
grate
public static <S,T, Grate<S,A, B> T, grateA, B> (FunctionType<FunctionType<FunctionType<S, A>, B>, T> grate) -
reForgetEP
public static <R,A, ReForgetEP<R,B> A, reForgetEPB> (String name, Function<Either<A, Pair<A, R>>, B> function) -
reForgetE
-
reForgetP
-
reForgetC
public static <R,A, ReForgetC<R,B> A, reForgetCB> (String name, Either<Function<R, B>, BiFunction<A, R, B>> either) -
pStore
-
getFunc
-
proj1
-
isProj1
-
proj2
-
isProj2
-
inj1
-
isInj1
-
inj2
-
isInj2
-
eitherLens
-
eitherAffine
-
eitherTraversal
-
listTraversal
-