Record Class SlotGroups.Entry

java.lang.Object
java.lang.Record
com.trevlar.slotkit.api.group.SlotGroups.Entry
Record Components:
key - the row's key, which every member's row shares; for the listing, not for saving
name - what to show
set - the set, or null for a lone group
groups - the groups the row stands for; one for a lone group
categories - the distinct categories of those groups, to filter by
source - the mod the row comes from, or null for vanilla; see source
Enclosing class:
SlotGroups

public static record SlotGroups.Entry(String key, net.minecraft.network.chat.Component name, @Nullable SlotGroupSet set, List<SlotGroupId> groups, List<SlotGroupCategory> categories, @Nullable net.minecraft.network.chat.Component source) extends Record
One row of the player-facing list.
  • Constructor Details

    • Entry

      public Entry(String key, net.minecraft.network.chat.Component name, @Nullable SlotGroupSet set, List<SlotGroupId> groups, List<SlotGroupCategory> categories)
      The 5.1.0 shape, with no source; kept so code built against it still links.
    • Entry

      public Entry(String key, net.minecraft.network.chat.Component name, @Nullable SlotGroupSet set, List<SlotGroupId> groups, List<SlotGroupCategory> categories, @Nullable net.minecraft.network.chat.Component source)
      Creates an instance of a Entry record class.
      Parameters:
      key - the value for the key record component
      name - the value for the name record component
      set - the value for the set record component
      groups - the value for the groups record component
      categories - the value for the categories record component
      source - the value for the source record component
  • Method Details

    • 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.
    • key

      public String key()
      Returns the value of the key record component.
      Returns:
      the value of the key record component
    • name

      public net.minecraft.network.chat.Component name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • set

      public @Nullable SlotGroupSet set()
      Returns the value of the set record component.
      Returns:
      the value of the set record component
    • groups

      public List<SlotGroupId> groups()
      Returns the value of the groups record component.
      Returns:
      the value of the groups record component
    • categories

      public List<SlotGroupCategory> categories()
      Returns the value of the categories record component.
      Returns:
      the value of the categories record component
    • source

      public @Nullable net.minecraft.network.chat.Component source()
      Returns the value of the source record component.
      Returns:
      the value of the source record component