Record Class DerivationTree.RuleNode
java.lang.Object
java.lang.Record
com.knezevic.edaf.v3.repr.grammar.model.DerivationTree.RuleNode
- All Implemented Interfaces:
DerivationTree
- Enclosing interface:
DerivationTree
public static record DerivationTree.RuleNode(NonTerminal nonTerminal, ProductionRule productionRule, List<DerivationTree> children, int depth)
extends Record
implements DerivationTree
Non-terminal expansion node.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.knezevic.edaf.v3.repr.grammar.model.DerivationTree
DerivationTree.RuleNode, DerivationTree.TerminalNode -
Constructor Summary
ConstructorsConstructorDescriptionRuleNode(NonTerminal nonTerminal, ProductionRule productionRule, List<DerivationTree> children, int depth) Immutable constructor. -
Method Summary
Modifier and TypeMethodDescriptionchildren()Returns the value of thechildrenrecord component.intdepth()Returns the value of thedepthrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thenonTerminalrecord component.Output type of this expression node.Returns the value of theproductionRulerecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.knezevic.edaf.v3.repr.grammar.model.DerivationTree
isTerminal
-
Constructor Details
-
RuleNode
public RuleNode(NonTerminal nonTerminal, ProductionRule productionRule, List<DerivationTree> children, int depth) Immutable constructor.
-
-
Method Details
-
outputType
Description copied from interface:DerivationTreeOutput type of this expression node.- Specified by:
outputTypein interfaceDerivationTree
-
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. -
nonTerminal
Returns the value of thenonTerminalrecord component.- Returns:
- the value of the
nonTerminalrecord component
-
productionRule
Returns the value of theproductionRulerecord component.- Returns:
- the value of the
productionRulerecord component
-
children
Returns the value of thechildrenrecord component.- Specified by:
childrenin interfaceDerivationTree- Returns:
- the value of the
childrenrecord component
-
depth
public int depth()Returns the value of thedepthrecord component.- Specified by:
depthin interfaceDerivationTree- Returns:
- the value of the
depthrecord component
-