java.lang.Object
java.lang.Record
org.aya.core.pat.PatUnify
public record PatUnify(@NotNull Subst lhsSubst, @NotNull Subst rhsSubst, @NotNull LocalCtx ctx)
extends Record
The unification of patterns. This is not pattern unification.
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明@NotNull LocalCtxctx()返回ctx记录组件的值。final boolean指示某个其他对象是否“等于”此对象。final inthashCode()返回此对象的哈希代码值。@NotNull SubstlhsSubst()返回lhsSubst记录组件的值。@NotNull SubstrhsSubst()返回rhsSubst记录组件的值。final StringtoString()返回此记录类的字符串表示形式。static @NotNull LocalCtxunifyPat(@NotNull kala.collection.SeqLike<Pat> lpats, @NotNull kala.collection.SeqLike<Pat> rpats, @NotNull Subst lhsSubst, @NotNull Subst rhsSubst, @NotNull LocalCtx ctx) The unification of patterns.
-
构造器详细资料
-
方法详细资料
-
unifyPat
@NotNull public static @NotNull LocalCtx unifyPat(@NotNull @NotNull kala.collection.SeqLike<Pat> lpats, @NotNull @NotNull kala.collection.SeqLike<Pat> rpats, @NotNull @NotNull Subst lhsSubst, @NotNull @NotNull Subst rhsSubst, @NotNull @NotNull LocalCtx ctx) The unification of patterns. Assumes well-typedness, homogeneous-ness and positive success.- 参数:
lhsSubst- the substitutions that would turn the lhs pattern to the rhs one.rhsSubst- the substitutions that would turn the rhs pattern to the lhs one.- 返回:
- a ctx that contains all variables that are not unified.
- 抛出:
IllegalArgumentException- if failed- 另请参阅:
-
visitAs(LocalVar, org.aya.core.pat.Pat)
-
toString
返回此记录类的字符串表示形式。此表示形式包含类的名称,后跟每个记录组件的名称和值。 -
hashCode
public final int hashCode()返回此对象的哈希代码值。此值派生自每个记录组件的哈希代码。 -
equals
指示某个其他对象是否“等于”此对象。如果两个对象属于同一个类,而且所有记录组件都相等,则这两个对象相等。 此记录类中的所有组件都使用Objects::equals(Object,Object)进行比较。 -
lhsSubst
返回lhsSubst记录组件的值。- 返回:
lhsSubst记录组件的值
-
rhsSubst
返回rhsSubst记录组件的值。- 返回:
rhsSubst记录组件的值
-
ctx
返回ctx记录组件的值。- 返回:
ctx记录组件的值
-