Record Class ComponentComposition
java.lang.Object
java.lang.Record
dev.archunitjava.metrics.ComponentComposition
- All Implemented Interfaces:
Comparable<ComponentComposition>
public record ComponentComposition(StableId component, int typeCount, int abstractTypeCount)
extends Record
implements Comparable<ComponentComposition>
Type inventory used only for abstractness; dependency counts always come from the projection.
-
Constructor Summary
ConstructorsConstructorDescriptionComponentComposition(StableId component, int typeCount, int abstractTypeCount) Creates an instance of aComponentCompositionrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleintReturns the value of theabstractTypeCountrecord component.intcompareTo(ComponentComposition other) Returns the value of thecomponentrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.intReturns the value of thetypeCountrecord component.
-
Constructor Details
-
ComponentComposition
Creates an instance of aComponentCompositionrecord class.- Parameters:
component- the value for thecomponentrecord componenttypeCount- the value for thetypeCountrecord componentabstractTypeCount- the value for theabstractTypeCountrecord component
-
-
Method Details
-
abstractness
public double abstractness() -
compareTo
- Specified by:
compareToin interfaceComparable<ComponentComposition>
-
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. -
component
Returns the value of thecomponentrecord component.- Returns:
- the value of the
componentrecord component
-
typeCount
public int typeCount()Returns the value of thetypeCountrecord component.- Returns:
- the value of the
typeCountrecord component
-
abstractTypeCount
public int abstractTypeCount()Returns the value of theabstractTypeCountrecord component.- Returns:
- the value of the
abstractTypeCountrecord component
-