Record Class HelpMenu

java.lang.Object
java.lang.Record
net.apartium.cocoabeans.commands.HelpMenu
Record Components:
label - The primary label or title of the help menu.
aliases - A list of alternative aliases for the help menu, allowing it to be accessed with different terms.
info - The command information, including descriptions, usages, and long descriptions relevant to the help menu.
requirements - A set of requirements that must be fulfilled to access or view this help menu. These can include permissions or other conditions.
entries - A list of HelpMenuEntry instances representing the individual entries within the help menu, each containing detailed information about specific command sub-sections.

@AvailableSince("0.0.50") public record HelpMenu(String label, List<String> aliases, CommandInfo info, Set<Requirement> requirements, List<HelpMenuEntry> entries) extends Record
Represents a help menu for commands, containing essential metadata, requirements, and entries. A help menu is associated with specific commands and provides guidance on their usage and descriptions.
  • Constructor Details

    • HelpMenu

      public HelpMenu(String label, List<String> aliases, CommandInfo info, Set<Requirement> requirements, List<HelpMenuEntry> entries)
      Creates an instance of a HelpMenu record class.
      Parameters:
      label - the value for the label record component
      aliases - the value for the aliases record component
      info - the value for the info record component
      requirements - the value for the requirements record component
      entries - the value for the entries 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.
    • label

      public String label()
      Returns the value of the label record component.
      Returns:
      the value of the label record component
    • aliases

      public List<String> aliases()
      Returns the value of the aliases record component.
      Returns:
      the value of the aliases record component
    • info

      public CommandInfo info()
      Returns the value of the info record component.
      Returns:
      the value of the info record component
    • requirements

      public Set<Requirement> requirements()
      Returns the value of the requirements record component.
      Returns:
      the value of the requirements record component
    • entries

      public List<HelpMenuEntry> entries()
      Returns the value of the entries record component.
      Returns:
      the value of the entries record component