java.lang.Object
java.lang.Record
org.aya.tyck.pat.PatTree
- All Implemented Interfaces:
org.aya.util.TreeBuilder.Tree<PatTree>
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theargsCountrecord component.@NotNull kala.collection.mutable.MutableList<PatTree>children()Returns the value of thechildrenrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanexplicit()Returns the value of theexplicitrecord component.final inthashCode()Returns a hash code value for this object.@NotNull Strings()Returns the value of thesrecord component.@NotNull org.aya.util.Arg<Pattern>final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PatTree
-
PatTree
public PatTree(@NotNull @NotNull String s, boolean explicit, int argsCount, @NotNull @NotNull kala.collection.mutable.MutableList<PatTree> children) Creates an instance of aPatTreerecord class.- Parameters:
s- the value for thesrecord componentexplicit- the value for theexplicitrecord componentargsCount- the value for theargsCountrecord componentchildren- the value for thechildrenrecord component
-
-
Method Details
-
toPattern
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
s
Returns the value of thesrecord component.- Returns:
- the value of the
srecord component
-
explicit
public boolean explicit()Returns the value of theexplicitrecord component.- Returns:
- the value of the
explicitrecord component
-
argsCount
public int argsCount()Returns the value of theargsCountrecord component.- Returns:
- the value of the
argsCountrecord component
-
children
Returns the value of thechildrenrecord component.- Specified by:
childrenin interfaceorg.aya.util.TreeBuilder.Tree<PatTree>- Returns:
- the value of the
childrenrecord component
-