Record Class TypedKey<T>
java.lang.Object
java.lang.Record
fr.fidorial.registry.TypedKey<T>
-
Constructor Summary
ConstructorsConstructorDescriptionTypedKey(RegistryKey<T> registry, Key key) Creates an instance of aTypedKeyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TypedKey<T> create(RegistryKey<T> registry, String key) static <T> TypedKey<T> create(RegistryKey<T> registry, Key key) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.key()Returns the value of thekeyrecord component.registry()Returns the value of theregistryrecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
TypedKey
Creates an instance of aTypedKeyrecord class.- Parameters:
registry- the value for theregistryrecord componentkey- the value for thekeyrecord component
-
-
Method Details
-
create
-
create
-
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). -
registry
Returns the value of theregistryrecord component.- Returns:
- the value of the
registryrecord component
-
key
Returns the value of thekeyrecord component.- Returns:
- the value of the
keyrecord component
-