Record Class ViolationSubject
java.lang.Object
java.lang.Record
dev.archunitjava.result.ViolationSubject
- All Implemented Interfaces:
Comparable<ViolationSubject>
public record ViolationSubject(String role, StableId id)
extends Record
implements Comparable<ViolationSubject>
A typed architecture subject and its machine-readable role in a violation.
-
Constructor Summary
ConstructorsConstructorDescriptionViolationSubject(String role, StableId id) Creates an instance of aViolationSubjectrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(ViolationSubject other) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.role()Returns the value of therolerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ViolationSubject
-
-
Method Details
-
compareTo
- Specified by:
compareToin interfaceComparable<ViolationSubject>
-
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). -
role
Returns the value of therolerecord component.- Returns:
- the value of the
rolerecord component
-
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-