Record Class RuleSelection
java.lang.Object
java.lang.Record
dev.archunitjava.rules.RuleSelection
public record RuleSelection(String role, SelectorDescription selector, int selectedCount)
extends Record
One named selector/count pair inspected by the shared rule terminal.
-
Constructor Summary
ConstructorsConstructorDescriptionRuleSelection(String role, SelectorDescription selector, int selectedCount) Creates an instance of aRuleSelectionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.role()Returns the value of therolerecord component.intReturns the value of theselectedCountrecord component.selector()Returns the value of theselectorrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
RuleSelection
Creates an instance of aRuleSelectionrecord class.- Parameters:
role- the value for therolerecord componentselector- the value for theselectorrecord componentselectedCount- the value for theselectedCountrecord component
-
-
Method Details
-
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. -
role
Returns the value of therolerecord component.- Returns:
- the value of the
rolerecord component
-
selector
Returns the value of theselectorrecord component.- Returns:
- the value of the
selectorrecord component
-
selectedCount
public int selectedCount()Returns the value of theselectedCountrecord component.- Returns:
- the value of the
selectedCountrecord component
-