Module aya.base

Record Class PatTree

java.lang.Object
java.lang.Record
org.aya.tyck.pat.PatTree
All Implemented Interfaces:
org.aya.util.TreeBuilder.Tree<PatTree>

public record PatTree(@NotNull String s, boolean explicit, int argsCount, @NotNull kala.collection.mutable.MutableList<PatTree> children) extends Record implements org.aya.util.TreeBuilder.Tree<PatTree>
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    PatTree(@NotNull String s, boolean explicit, int argsCount)
     
    PatTree(@NotNull String s, boolean explicit, int argsCount, @NotNull kala.collection.mutable.MutableList<PatTree> children)
    Creates an instance of a PatTree record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the value of the argsCount record component.
    @NotNull kala.collection.mutable.MutableList<PatTree>
    Returns the value of the children record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    boolean
    Returns the value of the explicit record component.
    final int
    Returns a hash code value for this object.
    @NotNull String
    s()
    Returns the value of the s record component.
    @NotNull org.aya.util.Arg<Pattern>
     
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • PatTree

      public PatTree(@NotNull @NotNull String s, boolean explicit, int argsCount)
    • PatTree

      public PatTree(@NotNull @NotNull String s, boolean explicit, int argsCount, @NotNull @NotNull kala.collection.mutable.MutableList<PatTree> children)
      Creates an instance of a PatTree record class.
      Parameters:
      s - the value for the s record component
      explicit - the value for the explicit record component
      argsCount - the value for the argsCount record component
      children - the value for the children record component
  • Method Details

    • toPattern

      @NotNull public @NotNull org.aya.util.Arg<Pattern> toPattern()
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • s

      @NotNull public @NotNull String s()
      Returns the value of the s record component.
      Returns:
      the value of the s record component
    • explicit

      public boolean explicit()
      Returns the value of the explicit record component.
      Returns:
      the value of the explicit record component
    • argsCount

      public int argsCount()
      Returns the value of the argsCount record component.
      Returns:
      the value of the argsCount record component
    • children

      @NotNull public @NotNull kala.collection.mutable.MutableList<PatTree> children()
      Returns the value of the children record component.
      Specified by:
      children in interface org.aya.util.TreeBuilder.Tree<PatTree>
      Returns:
      the value of the children record component