Record Class HierarchyRuleSpec
java.lang.Object
java.lang.Record
dev.archunitjava.rules.HierarchyRuleSpec
public record HierarchyRuleSpec(HierarchyRelation relation, HierarchyDepth depth, HierarchyRuleMode mode, UnknownInheritancePolicy unknownHierarchy)
extends Record
Immutable relationship, traversal, mood, and unknown-ancestor policy.
-
Constructor Summary
ConstructorsConstructorDescriptionHierarchyRuleSpec(HierarchyRelation relation, HierarchyDepth depth, HierarchyRuleMode mode, UnknownInheritancePolicy unknownHierarchy) Creates an instance of aHierarchyRuleSpecrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondepth()Returns the value of thedepthrecord component.static HierarchyRuleSpecdirect(HierarchyRelation relation, HierarchyRuleMode mode) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.mode()Returns the value of themoderecord component.static HierarchyRuleSpecpermitting(HierarchyRuleMode mode) relation()Returns the value of therelationrecord component.final StringtoString()Returns a string representation of this record class.static HierarchyRuleSpectransitive(HierarchyRelation relation, HierarchyRuleMode mode) Returns the value of theunknownHierarchyrecord component.
-
Constructor Details
-
HierarchyRuleSpec
public HierarchyRuleSpec(HierarchyRelation relation, HierarchyDepth depth, HierarchyRuleMode mode, UnknownInheritancePolicy unknownHierarchy) Creates an instance of aHierarchyRuleSpecrecord class.- Parameters:
relation- the value for therelationrecord componentdepth- the value for thedepthrecord componentmode- the value for themoderecord componentunknownHierarchy- the value for theunknownHierarchyrecord component
-
-
Method Details
-
direct
-
transitive
-
permitting
-
withUnknownHierarchy
-
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). -
relation
Returns the value of therelationrecord component.- Returns:
- the value of the
relationrecord component
-
depth
Returns the value of thedepthrecord component.- Returns:
- the value of the
depthrecord component
-
mode
Returns the value of themoderecord component.- Returns:
- the value of the
moderecord component
-
unknownHierarchy
Returns the value of theunknownHierarchyrecord component.- Returns:
- the value of the
unknownHierarchyrecord component
-