public final class RecursiveTypeFamily extends Object implements TypeFamily
Constructor and Description |
---|
RecursiveTypeFamily(String name,
TypeTemplate template) |
Modifier and Type | Method and Description |
---|---|
RecursivePoint.RecursivePointType<?> |
apply(int index) |
<A> RecursivePoint.RecursivePointType<A> |
buildMuType(Type<A> newType,
RecursiveTypeFamily newFamily) |
boolean |
equals(Object o) |
Optional<RewriteResult<?,?>> |
everywhere(int index,
TypeRewriteRule rule,
PointFreeRule optimizationRule) |
<A,B> (TypedOptic<?,?,A,B>|Type.FieldNotFoundException) |
findType(int index,
Type<A> aType,
Type<B> bType,
Type.TypeMatcher<A,B> matcher,
boolean recurse) |
(int) -> RewriteResult<?,?> |
fold(Algebra algebra)
returns family.apply(index) -> algebra.family.apply(index)
|
int |
hashCode() |
String |
name() |
int |
size() |
TypeTemplate |
template() |
String |
toString() |
static <A,B> View<A,B> |
viewUnchecked(Type<?> type,
Type<?> resType,
PointFree<(A) -> B> function) |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
familyOptic
public RecursiveTypeFamily(String name, TypeTemplate template)
public static <A,B> View<A,B> viewUnchecked(Type<?> type, Type<?> resType, PointFree<(A) -> B> function)
public <A> RecursivePoint.RecursivePointType<A> buildMuType(Type<A> newType, @Nullable RecursiveTypeFamily newFamily)
public String name()
public TypeTemplate template()
public int size()
public (int) -> RewriteResult<?,?> fold(Algebra algebra)
public RecursivePoint.RecursivePointType<?> apply(int index)
apply
in interface TypeFamily
public <A,B> (TypedOptic<?,?,A,B>|Type.FieldNotFoundException) findType(int index, Type<A> aType, Type<B> bType, Type.TypeMatcher<A,B> matcher, boolean recurse)
public Optional<RewriteResult<?,?>> everywhere(int index, TypeRewriteRule rule, PointFreeRule optimizationRule)