Record Class CumulativeDependencyMetrics
java.lang.Object
java.lang.Record
dev.archunitjava.metrics.CumulativeDependencyMetrics
public record CumulativeDependencyMetrics(int componentCount, long cumulativeComponentDependency, double averageComponentDependency, double relativeAverageComponentDependency, double normalizedCumulativeComponentDependency, Map<StableId,Integer> dependsOn)
extends Record
Lakos metrics. dependsOn includes the subject itself; CCD is their sum, ACD=CCD/N,
RACD=ACD/N, and NCCD=CCD divided by a same-size complete-level balanced binary tree's CCD.
Every value is zero for an empty projection.
-
Constructor Summary
ConstructorsConstructorDescriptionCumulativeDependencyMetrics(int componentCount, long cumulativeComponentDependency, double averageComponentDependency, double relativeAverageComponentDependency, double normalizedCumulativeComponentDependency, Map<StableId, Integer> dependsOn) Creates an instance of aCumulativeDependencyMetricsrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of theaverageComponentDependencyrecord component.intReturns the value of thecomponentCountrecord component.longReturns the value of thecumulativeComponentDependencyrecord component.Returns the value of thedependsOnrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doubleReturns the value of thenormalizedCumulativeComponentDependencyrecord component.doubleReturns the value of therelativeAverageComponentDependencyrecord component.samples(ProjectionDomain domain) final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CumulativeDependencyMetrics
public CumulativeDependencyMetrics(int componentCount, long cumulativeComponentDependency, double averageComponentDependency, double relativeAverageComponentDependency, double normalizedCumulativeComponentDependency, Map<StableId, Integer> dependsOn) Creates an instance of aCumulativeDependencyMetricsrecord class.- Parameters:
componentCount- the value for thecomponentCountrecord componentcumulativeComponentDependency- the value for thecumulativeComponentDependencyrecord componentaverageComponentDependency- the value for theaverageComponentDependencyrecord componentrelativeAverageComponentDependency- the value for therelativeAverageComponentDependencyrecord componentnormalizedCumulativeComponentDependency- the value for thenormalizedCumulativeComponentDependencyrecord componentdependsOn- the value for thedependsOnrecord component
-
-
Method Details
-
samples
-
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. -
componentCount
public int componentCount()Returns the value of thecomponentCountrecord component.- Returns:
- the value of the
componentCountrecord component
-
cumulativeComponentDependency
public long cumulativeComponentDependency()Returns the value of thecumulativeComponentDependencyrecord component.- Returns:
- the value of the
cumulativeComponentDependencyrecord component
-
averageComponentDependency
public double averageComponentDependency()Returns the value of theaverageComponentDependencyrecord component.- Returns:
- the value of the
averageComponentDependencyrecord component
-
relativeAverageComponentDependency
public double relativeAverageComponentDependency()Returns the value of therelativeAverageComponentDependencyrecord component.- Returns:
- the value of the
relativeAverageComponentDependencyrecord component
-
normalizedCumulativeComponentDependency
public double normalizedCumulativeComponentDependency()Returns the value of thenormalizedCumulativeComponentDependencyrecord component.- Returns:
- the value of the
normalizedCumulativeComponentDependencyrecord component
-
dependsOn
-