Record Class HierarchyRelationship
java.lang.Object
java.lang.Record
dev.archunitjava.model.HierarchyRelationship
- All Implemented Interfaces:
Comparable<HierarchyRelationship>
public record HierarchyRelationship(JavaTypeName origin, JavaTypeName target, HierarchyRelationshipKind kind)
extends Record
implements Comparable<HierarchyRelationship>
One direct, typed hierarchy relationship.
-
Constructor Summary
ConstructorsConstructorDescriptionHierarchyRelationship(JavaTypeName origin, JavaTypeName target, HierarchyRelationshipKind kind) Creates an instance of aHierarchyRelationshiprecord class. -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(HierarchyRelationship other) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.kind()Returns the value of thekindrecord component.origin()Returns the value of theoriginrecord component.target()Returns the value of thetargetrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
HierarchyRelationship
public HierarchyRelationship(JavaTypeName origin, JavaTypeName target, HierarchyRelationshipKind kind) Creates an instance of aHierarchyRelationshiprecord class.- Parameters:
origin- the value for theoriginrecord componenttarget- the value for thetargetrecord componentkind- the value for thekindrecord component
-
-
Method Details
-
compareTo
- Specified by:
compareToin interfaceComparable<HierarchyRelationship>
-
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 withObjects::equals(Object,Object). -
origin
Returns the value of theoriginrecord component.- Returns:
- the value of the
originrecord component
-
target
Returns the value of thetargetrecord component.- Returns:
- the value of the
targetrecord component
-
kind
Returns the value of thekindrecord component.- Returns:
- the value of the
kindrecord component
-