Interface TypeTemplate
- All Known Implementing Classes:
Check
,CompoundList
,Const
,Hook
,List
,Named
,Product
,RecursivePoint
,Sum
,Tag
,TaggedChoice
public interface TypeTemplate
-
Method Summary
Modifier and TypeMethodDescriptionapply
(TypeFamily family) <A,
B> FamilyOptic<A, B> applyO
(FamilyOptic<A, B> input, Type<A> aType, Type<B> bType) findFieldOrType
(int index, String name, Type<A> type, Type<B> resultType) IntFunction<RewriteResult<?,
?>> hmap
(TypeFamily family, IntFunction<RewriteResult<?, ?>> function) int
size()
default Type<?>
-
Method Details
-
size
int size() -
apply
-
toSimpleType
-
findFieldOrType
<A,B> Either<TypeTemplate,Type.FieldNotFoundException> findFieldOrType(int index, @Nullable String name, Type<A> type, Type<B> resultType) - Mojang-Added Docs:
returned optic will accept template<family<index>> with the input template, and will return the same with the returned template
(template, optic) = Left(result)
this.apply(family).apply(index) == optic.sType
template.apply(family).apply(index) == optic.tType
-
hmap
- Mojang-Added Docs:
constraint: family, argFamily and resFamily are matched
result.function(i) :: this.apply(function.argFamily()).apply(i) -> this.apply(function.resFamily()).apply(i)
-
applyO
-