Record Class ModuleInfo
java.lang.Object
java.lang.Record
org.ek9lang.cli.coverage.model.ModuleInfo
- Record Components:
name- The module name (e.g., "my.module")moduleId- The unique identifier for this module from CoverageRuntimecoverage- The overall coverage percentage for this modulehits- Number of probes that were hit during teststotal- Total number of probes in this modulefiles- List of source files belonging to this module
public record ModuleInfo(String name, long moduleId, double coverage, int hits, int total, List<SourceFileInfo> files)
extends Record
Module information for grouping and display in coverage reports.
Aggregates coverage data for all source files belonging to a module.
-
Constructor Summary
ConstructorsConstructorDescriptionModuleInfo(String name, long moduleId, double coverage, int hits, int total, List<SourceFileInfo> files) Creates an instance of aModuleInforecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoublecoverage()Returns the value of thecoveragerecord component.final booleanIndicates whether some other object is "equal to" this one.files()Returns the value of thefilesrecord component.final inthashCode()Returns a hash code value for this object.inthits()Returns the value of thehitsrecord component.booleanCheck if this module has full coverage.booleanmeetsThreshold(double threshold) Check if this module meets the coverage threshold.longmoduleId()Returns the value of themoduleIdrecord component.name()Returns the value of thenamerecord component.final StringtoString()Returns a string representation of this record class.inttotal()Returns the value of thetotalrecord component.intGet the number of uncovered probes.
-
Constructor Details
-
ModuleInfo
public ModuleInfo(String name, long moduleId, double coverage, int hits, int total, List<SourceFileInfo> files) Creates an instance of aModuleInforecord class.- Parameters:
name- the value for thenamerecord componentmoduleId- the value for themoduleIdrecord componentcoverage- the value for thecoveragerecord componenthits- the value for thehitsrecord componenttotal- the value for thetotalrecord componentfiles- the value for thefilesrecord component
-
-
Method Details
-
meetsThreshold
public boolean meetsThreshold(double threshold) Check if this module meets the coverage threshold.- Parameters:
threshold- The coverage percentage threshold (e.g., 80.0)- Returns:
- true if coverage meets or exceeds threshold
-
isFullyCovered
public boolean isFullyCovered()Check if this module has full coverage.- Returns:
- true if all probes were hit
-
uncoveredCount
public int uncoveredCount()Get the number of uncovered probes.- Returns:
- Number of probes not hit
-
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. -
name
-
moduleId
-
coverage
-
hits
-
total
-
files
-