Enum Class ItemRecord.Field
java.lang.Object
java.lang.Enum<ItemRecord.Field>
com.winterhavenmc.library.messagebuilder.model.language.ItemRecord.Field
- All Implemented Interfaces:
Serializable
,Comparable<ItemRecord.Field>
,Constable
- Enclosing interface:
ItemRecord
Enumeration of field keys within an
ItemRecord
, mapping enum constants
to their corresponding YAML key paths.
This enum centralizes all known fields used for parsing and provides a stable location for field-to-path mappings. It also allows the YAML structure to evolve without requiring widespread changes to lookup logic.
Example usage:
String singularName = section.getString(ItemRecord.Field.NAME_SINGULAR.toKey());
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptiontoKey()
Returns the YAML key path string associated with this field.static ItemRecord.Field
Returns the enum constant of this class with the specified name.static ItemRecord.Field[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NAME_SINGULAR
-
NAME_PLURAL
-
INVENTORY_NAME_SINGULAR
-
INVENTORY_NAME_PLURAL
-
LORE
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
toKey
Returns the YAML key path string associated with this field.- Returns:
- the raw configuration key string
-