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 interface 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
-
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). -
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
-