模块 aya.base
程序包 org.aya.core.pat

记录类 PatUnify

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.
另请参阅:
  • 构造器概要

    构造器
    构造器
    说明
    PatUnify(@NotNull Subst lhsSubst, @NotNull Subst rhsSubst, @NotNull LocalCtx ctx)
    创建 PatUnify 记录类的实例。
  • 方法概要

    修饰符和类型
    方法
    说明
    @NotNull LocalCtx
    ctx()
    返回 ctx 记录组件的值。
    final boolean
    指示某个其他对象是否“等于”此对象。
    final int
    返回此对象的哈希代码值。
    @NotNull Subst
    返回 lhsSubst 记录组件的值。
    @NotNull Subst
    返回 rhsSubst 记录组件的值。
    final String
    返回此记录类的字符串表示形式。
    static @NotNull LocalCtx
    unifyPat(@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.

    从类继承的方法 java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • 构造器详细资料

    • PatUnify

      public PatUnify(@NotNull @NotNull Subst lhsSubst, @NotNull @NotNull Subst rhsSubst, @NotNull @NotNull LocalCtx ctx)
      创建 PatUnify 记录类的实例。
      参数:
      lhsSubst - lhsSubst 记录组件的值
      rhsSubst - rhsSubst 记录组件的值
      ctx - ctx 记录组件的值
  • 方法详细资料

    • 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

      public final String toString()
      返回此记录类的字符串表示形式。此表示形式包含类的名称,后跟每个记录组件的名称和值。
      指定者:
      toString 在类中 Record
      返回:
      此对象的字符串表示形式
    • hashCode

      public final int hashCode()
      返回此对象的哈希代码值。此值派生自每个记录组件的哈希代码。
      指定者:
      hashCode 在类中 Record
      返回:
      此对象的哈希代码值
    • equals

      public final boolean equals(Object o)
      指示某个其他对象是否“等于”此对象。如果两个对象属于同一个类,而且所有记录组件都相等,则这两个对象相等。 此记录类中的所有组件都使用 Objects::equals(Object,Object) 进行比较。
      指定者:
      equals 在类中 Record
      参数:
      o - 要与之进行比较的对象
      返回:
      如果此对象与 o 参数相同,则为 true;否则为 false
    • lhsSubst

      @NotNull public @NotNull Subst lhsSubst()
      返回 lhsSubst 记录组件的值。
      返回:
      lhsSubst 记录组件的值
    • rhsSubst

      @NotNull public @NotNull Subst rhsSubst()
      返回 rhsSubst 记录组件的值。
      返回:
      rhsSubst 记录组件的值
    • ctx

      @NotNull public @NotNull LocalCtx ctx()
      返回 ctx 记录组件的值。
      返回:
      ctx 记录组件的值