Record Class DefaultGroup

java.lang.Object
java.lang.Record
johnsmith.configoverhauled.impl.core.state.DefaultGroup
All Implemented Interfaces:
Group

public record DefaultGroup(Category parent, String id, ConfigManager manager) extends Record implements Group
  • Constructor Details

    • DefaultGroup

      public DefaultGroup(Category parent, String id, ConfigManager manager)
      Creates an instance of a DefaultGroup record class.
      Parameters:
      parent - the value for the parent record component
      id - the value for the id record component
      manager - the value for the manager record component
  • Method Details

    • translationKey

      public String translationKey()
      Description copied from interface: Group
      Retrieves the base localization key utilized for client-side GUI translation.
      Specified by:
      translationKey in interface Group
      Returns:
      The formatted translation key string.
    • remove

      public void remove(Property<?> property)
      Description copied from interface: Group
      Severs the structural bond between this group and the specified property.
      Specified by:
      remove in interface Group
      Parameters:
      property - The target property to remove.
    • isEmpty

      public boolean isEmpty()
      Description copied from interface: Group
      Evaluates the active state of the group's registry.
      Specified by:
      isEmpty in interface Group
      Returns:
      True if no properties are currently bound to this group.
    • define

      public Group.IScopeStep define(String resourceName)
      Description copied from interface: Group
      Initiates the fluent builder sequence to construct and bind a new property to this group.
      Specified by:
      define in interface Group
      Parameters:
      resourceName - The precise registry identifier for the intended property.
      Returns:
      The initial scope resolution step of the builder.
    • toString

      public final 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • parent

      public Category parent()
      Returns the value of the parent record component.
      Specified by:
      parent in interface Group
      Returns:
      the value of the parent record component
    • id

      public String id()
      Returns the value of the id record component.
      Specified by:
      id in interface Group
      Returns:
      the value of the id record component
    • manager

      public ConfigManager manager()
      Returns the value of the manager record component.
      Specified by:
      manager in interface Group
      Returns:
      the value of the manager record component