Record Class ModuleIdentityId
java.lang.Object
java.lang.Record
dev.archunitjava.rules.ModuleIdentityId
- All Implemented Interfaces:
StableId, Comparable<StableId>
public record ModuleIdentityId(JavaModuleKind kind, String identity)
extends Record
implements StableId
Stable result identity that cannot collapse explicit, automatic, and unnamed modules.
-
Constructor Summary
ConstructorsConstructorDescriptionModuleIdentityId(JavaModuleKind kind, String identity) Creates an instance of aModuleIdentityIdrecord 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.identity()Returns the value of theidentityrecord component.kind()Returns the value of thekindrecord component.static ModuleIdentityIdof(JavaModuleIdentity identity) final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ModuleIdentityId
Creates an instance of aModuleIdentityIdrecord class.- Parameters:
kind- the value for thekindrecord componentidentity- the value for theidentityrecord component
-
-
Method Details
-
of
-
stableKey
-
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). -
kind
Returns the value of thekindrecord component.- Returns:
- the value of the
kindrecord component
-
identity
Returns the value of theidentityrecord component.- Returns:
- the value of the
identityrecord component
-