Record Class EnumTranslationCategory<E extends Enum<E> & net.minecraft.util.StringRepresentable>
java.lang.Object
java.lang.Record
com.portingdeadmods.portingdeadlibs.api.translations.EnumTranslationCategory<E>
- All Implemented Interfaces:
TranslationCategory<E>
public record EnumTranslationCategory<E extends Enum<E> & net.minecraft.util.StringRepresentable>(DeferredTranslationRegister parentRegister, String category)
extends Record
implements TranslationCategory<E>
-
Constructor Summary
ConstructorsConstructorDescriptionEnumTranslationCategory(DeferredTranslationRegister parentRegister, String category) Creates an instance of aEnumTranslationCategoryrecord 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(E 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
-
EnumTranslationCategory
Creates an instance of aEnumTranslationCategoryrecord class.- Parameters:
parentRegister- the value for theparentRegisterrecord componentcategory- the value for thecategoryrecord component
-
-
Method Details
-
keyToString
- Specified by:
keyToStringin interfaceTranslationCategory<E extends Enum<E> & net.minecraft.util.StringRepresentable>
-
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<E extends Enum<E> & net.minecraft.util.StringRepresentable>- Returns:
- the value of the
parentRegisterrecord component
-
category
Returns the value of thecategoryrecord component.- Specified by:
categoryin interfaceTranslationCategory<E extends Enum<E> & net.minecraft.util.StringRepresentable>- Returns:
- the value of the
categoryrecord component
-