Record Class ModuleGroupStats
java.lang.Object
java.lang.Record
org.ek9lang.cli.coverage.model.ModuleGroupStats
-
Constructor Summary
ConstructorsConstructorDescriptionModuleGroupStats(String groupName, int moduleCount, int totalHits, int totalProbes) Creates an instance of aModuleGroupStatsrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleCalculate the coverage percentage for this group.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thegroupNamerecord component.final inthashCode()Returns a hash code value for this object.intReturns the value of themoduleCountrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of thetotalHitsrecord component.intReturns the value of thetotalProbesrecord component.
-
Constructor Details
-
ModuleGroupStats
Creates an instance of aModuleGroupStatsrecord class.- Parameters:
groupName- the value for thegroupNamerecord componentmoduleCount- the value for themoduleCountrecord componenttotalHits- the value for thetotalHitsrecord componenttotalProbes- the value for thetotalProbesrecord component
-
-
Method Details
-
coveragePercent
public double coveragePercent()Calculate the coverage percentage for this group.- Returns:
- coverage as percentage (0-100), or 0 if no probes
-
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. -
groupName
Returns the value of thegroupNamerecord component.- Returns:
- the value of the
groupNamerecord component
-
moduleCount
public int moduleCount()Returns the value of themoduleCountrecord component.- Returns:
- the value of the
moduleCountrecord component
-
totalHits
public int totalHits()Returns the value of thetotalHitsrecord component.- Returns:
- the value of the
totalHitsrecord component
-
totalProbes
public int totalProbes()Returns the value of thetotalProbesrecord component.- Returns:
- the value of the
totalProbesrecord component
-