Record Class TreeMetrics.Summary
java.lang.Object
java.lang.Record
com.knezevic.edaf.v3.repr.grammar.render.TreeMetrics.Summary
- Enclosing class:
TreeMetrics
public static record TreeMetrics.Summary(int depth, int size, int terminalCount, int ruleCount, Map<String,Long> operatorUsage)
extends Record
Immutable metrics summary.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintdepth()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 theoperatorUsagerecord component.intReturns the value of theruleCountrecord component.intsize()Returns the value of thesizerecord component.intReturns the value of theterminalCountrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Summary
public Summary(int depth, int size, int terminalCount, int ruleCount, Map<String, Long> operatorUsage) Creates an instance of aSummaryrecord class.- Parameters:
depth- the value for thedepthrecord componentsize- the value for thesizerecord componentterminalCount- the value for theterminalCountrecord componentruleCount- the value for theruleCountrecord componentoperatorUsage- the value for theoperatorUsagerecord component
-
-
Method Details
-
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. -
depth
public int depth()Returns the value of thedepthrecord component.- Returns:
- the value of the
depthrecord component
-
size
public int size()Returns the value of thesizerecord component.- Returns:
- the value of the
sizerecord component
-
terminalCount
public int terminalCount()Returns the value of theterminalCountrecord component.- Returns:
- the value of the
terminalCountrecord component
-
ruleCount
public int ruleCount()Returns the value of theruleCountrecord component.- Returns:
- the value of the
ruleCountrecord component
-
operatorUsage
-