java.lang.Object
java.lang.Record
org.aya.tyck.ctx.LocalLet
public record LocalLet(@Nullable LocalLet parent, @NotNull kala.collection.mutable.MutableLinkedHashMap<org.aya.syntax.ref.LocalVar,Jdg> subst)
extends Record
implements org.aya.util.Scoped<org.aya.syntax.ref.LocalVar,Jdg,LocalLet>
A locally, lazy substitution
Every substitution should be well-scoped, i.e.,
Every substitution should be well-scoped, i.e.,
Jdg can only refer to some free variable or elder lazy substitution.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull LocalLetderive()final booleanIndicates whether some other object is "equal to" this one.@NotNull kala.control.Option<Jdg> getLocal(@NotNull org.aya.syntax.ref.LocalVar key) final inthashCode()Returns a hash code value for this object.@Nullable LocalLetparent()Returns the value of theparentrecord component.void@NotNull LocalLetself()@NotNull kala.collection.mutable.MutableLinkedHashMap<org.aya.syntax.ref.LocalVar, Jdg> subst()Returns the value of thesubstrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.aya.util.Scoped
contains, containsLocal, fold, get, put
-
Constructor Details
-
LocalLet
public LocalLet() -
LocalLet
public LocalLet(@Nullable @Nullable LocalLet parent, @NotNull @NotNull kala.collection.mutable.MutableLinkedHashMap<org.aya.syntax.ref.LocalVar, Jdg> subst) Creates an instance of aLocalLetrecord class.- Parameters:
parent- the value for theparentrecord componentsubst- the value for thesubstrecord component
-
-
Method Details
-
self
-
derive
-
getLocal
@NotNull public @NotNull kala.control.Option<Jdg> getLocal(@NotNull @NotNull org.aya.syntax.ref.LocalVar key) -
putLocal
public void putLocal(@NotNull @NotNull org.aya.syntax.ref.LocalVar key, @NotNull @NotNull Jdg value) -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
parent
Returns the value of theparentrecord component. -
subst
@NotNull public @NotNull kala.collection.mutable.MutableLinkedHashMap<org.aya.syntax.ref.LocalVar,Jdg> subst()Returns the value of thesubstrecord component.- Returns:
- the value of the
substrecord component
-