Record Class ModuleDependencyComparison

java.lang.Object
java.lang.Record
dev.archunitjava.rules.ModuleDependencyComparison

public record ModuleDependencyComparison(List<ModuleDependencyObservation> declaredRequires, List<ModuleDependencyObservation> observedDependencies, List<ModuleDependencyObservation> observedWithoutRequires, List<ModuleDependencyObservation> requiresWithoutObserved, int unmappedObservedEdges) extends Record
Detached comparison of declared readability and bytecode-observed module dependencies.
  • Constructor Details

    • ModuleDependencyComparison

      public ModuleDependencyComparison(List<ModuleDependencyObservation> declaredRequires, List<ModuleDependencyObservation> observedDependencies, List<ModuleDependencyObservation> observedWithoutRequires, List<ModuleDependencyObservation> requiresWithoutObserved, int unmappedObservedEdges)
      Creates an instance of a ModuleDependencyComparison record class.
      Parameters:
      declaredRequires - the value for the declaredRequires record component
      observedDependencies - the value for the observedDependencies record component
      observedWithoutRequires - the value for the observedWithoutRequires record component
      requiresWithoutObserved - the value for the requiresWithoutObserved record component
      unmappedObservedEdges - the value for the unmappedObservedEdges record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • declaredRequires

      public List<ModuleDependencyObservation> declaredRequires()
      Returns the value of the declaredRequires record component.
      Returns:
      the value of the declaredRequires record component
    • observedDependencies

      public List<ModuleDependencyObservation> observedDependencies()
      Returns the value of the observedDependencies record component.
      Returns:
      the value of the observedDependencies record component
    • observedWithoutRequires

      public List<ModuleDependencyObservation> observedWithoutRequires()
      Returns the value of the observedWithoutRequires record component.
      Returns:
      the value of the observedWithoutRequires record component
    • requiresWithoutObserved

      public List<ModuleDependencyObservation> requiresWithoutObserved()
      Returns the value of the requiresWithoutObserved record component.
      Returns:
      the value of the requiresWithoutObserved record component
    • unmappedObservedEdges

      public int unmappedObservedEdges()
      Returns the value of the unmappedObservedEdges record component.
      Returns:
      the value of the unmappedObservedEdges record component