Record Class DefaultTranslationCategory
java.lang.Object
java.lang.Record
com.portingdeadmods.portingdeadlibs.api.translations.DefaultTranslationCategory
- All Implemented Interfaces:
TranslationCategory<String>
public record DefaultTranslationCategory(DeferredTranslationRegister parentRegister, String category)
extends Record
implements TranslationCategory<String>
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultTranslationCategory(DeferredTranslationRegister parentRegister, String category) Creates an instance of aDefaultTranslationCategoryrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncategory()Returns the value of thecategoryrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.keyToString(String key) Returns the value of theparentRegisterrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.portingdeadmods.portingdeadlibs.api.translations.TranslationCategory
registerWithDefault
-
Constructor Details
-
DefaultTranslationCategory
Creates an instance of aDefaultTranslationCategoryrecord class.- Parameters:
parentRegister- the value for theparentRegisterrecord componentcategory- the value for thecategoryrecord component
-
-
Method Details
-
keyToString
- Specified by:
keyToStringin interfaceTranslationCategory<String>
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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). -
parentRegister
Returns the value of theparentRegisterrecord component.- Specified by:
parentRegisterin interfaceTranslationCategory<String>- Returns:
- the value of the
parentRegisterrecord component
-
category
Returns the value of thecategoryrecord component.- Specified by:
categoryin interfaceTranslationCategory<String>- Returns:
- the value of the
categoryrecord component
-