Record Class Grammar.Call
java.lang.Object
java.lang.Record
org.libxmq.imp.ixml.earley.Grammar.Call
- Record Components:
rule- the called rulemark- '^', '@', '-' or 0 for no mark on the callalias- the alias of the call, call>alias, or null
- All Implemented Interfaces:
Grammar.Symbol
- Enclosing class:
Grammar
public static record Grammar.Call(Grammar.Rule rule, char mark, String alias)
extends Record
implements Grammar.Symbol
A call of a rule. The mark and alias of the call override those of the rule.
-
Constructor Summary
ConstructorsConstructorDescriptionCall(Grammar.Rule rule, char mark, String alias) Creates an instance of aCallrecord class. -
Method Summary
Modifier and TypeMethodDescriptionalias()Returns the value of thealiasrecord component.charThe mark used in the output: the mark of the call, else the mark of the rule, else '^'.The name used in the output: the alias of the call, else the alias or the name of the rule.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.charmark()Returns the value of themarkrecord component.rule()Returns the value of therulerecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface Grammar.Symbol
isZeroWidthModifier and TypeMethodDescriptiondefault booleanReturns true if the symbol matches nothing: the parser steps over it.
-
Constructor Details
-
Method Details
-
effectiveMark
public char effectiveMark()The mark used in the output: the mark of the call, else the mark of the rule, else '^'.- Returns:
- '^', '@' or '-'
-
effectiveName
The name used in the output: the alias of the call, else the alias or the name of the rule.- Returns:
- the name
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
rule
-
mark
-
alias
-