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

public static enum ItemRecord.Field extends Enum<ItemRecord.Field>
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());
  • Enum Constant Details

  • Method Details

    • values

      public static ItemRecord.Field[] 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

      public static ItemRecord.Field valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • toKey

      public String toKey()
      Returns the YAML key path string associated with this field.
      Returns:
      the raw configuration key string