Package pl.tfij.test.modulesize
Record Class ProjectSummary.ModuleSummary
java.lang.Object
java.lang.Record
pl.tfij.test.modulesize.ProjectSummary.ModuleSummary
- Record Components:
moduleName- the name of the analyzed moduleNamenumberOfFiles- number of files in the moduleNamelinesOfCode- total number of lines of code in the moduleNamerelativeSize- relative size of the moduleName. It is a number in the range of 0-1. One represents 100%, indicating that all the code of the project is in this moduleName.
- Enclosing class:
- ProjectSummary
-
Constructor Summary
ConstructorsConstructorDescriptionModuleSummary(String moduleName, int numberOfFiles, int linesOfCode, double relativeSize) Creates an instance of aModuleSummaryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of thelinesOfCoderecord component.Returns the value of themoduleNamerecord component.intReturns the value of thenumberOfFilesrecord component.doubleReturns the value of therelativeSizerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ModuleSummary
Creates an instance of aModuleSummaryrecord class.- Parameters:
moduleName- the value for themoduleNamerecord componentnumberOfFiles- the value for thenumberOfFilesrecord componentlinesOfCode- the value for thelinesOfCoderecord componentrelativeSize- the value for therelativeSizerecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
moduleName
Returns the value of themoduleNamerecord component.- Returns:
- the value of the
moduleNamerecord component
-
numberOfFiles
public int numberOfFiles()Returns the value of thenumberOfFilesrecord component.- Returns:
- the value of the
numberOfFilesrecord component
-
linesOfCode
public int linesOfCode()Returns the value of thelinesOfCoderecord component.- Returns:
- the value of the
linesOfCoderecord component
-
relativeSize
public double relativeSize()Returns the value of therelativeSizerecord component.- Returns:
- the value of the
relativeSizerecord component
-