Record Class SourceLineMetrics
java.lang.Object
java.lang.Record
dev.archunitjava.metrics.SourceLineMetrics
public record SourceLineMetrics(long physicalLines, long blankLines, long commentLines, long codeLines)
extends Record
Physical Java line counts. Mixed code/comment lines are code; whitespace-only lines inside a
block comment are comments; text-block content is code. Empty text has zero physical lines.
-
Constructor Summary
ConstructorsConstructorDescriptionSourceLineMetrics(long physicalLines, long blankLines, long commentLines, long codeLines) Creates an instance of aSourceLineMetricsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of theblankLinesrecord component.longReturns the value of thecodeLinesrecord component.longReturns the value of thecommentLinesrecord component.static SourceLineMetricsfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longReturns the value of thephysicalLinesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SourceLineMetrics
public SourceLineMetrics(long physicalLines, long blankLines, long commentLines, long codeLines) Creates an instance of aSourceLineMetricsrecord class.- Parameters:
physicalLines- the value for thephysicalLinesrecord componentblankLines- the value for theblankLinesrecord componentcommentLines- the value for thecommentLinesrecord componentcodeLines- the value for thecodeLinesrecord component
-
-
Method Details
-
count
-
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. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
physicalLines
public long physicalLines()Returns the value of thephysicalLinesrecord component.- Returns:
- the value of the
physicalLinesrecord component
-
blankLines
public long blankLines()Returns the value of theblankLinesrecord component.- Returns:
- the value of the
blankLinesrecord component
-
commentLines
public long commentLines()Returns the value of thecommentLinesrecord component.- Returns:
- the value of the
commentLinesrecord component
-
codeLines
public long codeLines()Returns the value of thecodeLinesrecord component.- Returns:
- the value of the
codeLinesrecord component
-