Record Class HelpMenuEntry

java.lang.Object
java.lang.Record
net.apartium.cocoabeans.commands.HelpMenuEntry
Record Components:
label - the label of the command
info - detailed information about the command, including descriptions and usage examples
requirements - the set of requirements that must be met to execute the command
section - the section or category to which this command belongs in the help menu
since - the version since this command has been available
id - the unique identifier for this help menu entry

@AvailableSince("0.0.50") public record HelpMenuEntry(String label, CommandInfo info, Set<Requirement> requirements, String section, String since, String id) extends Record
Represents an entry in the help menu, which provides information about commands and their usage. This class holds metadata about a specific command, including its labels, detailed information, requirements for execution, organizational section grouping, and versioning details.
  • Constructor Details

    • HelpMenuEntry

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

      public String section()
      Returns the value of the section record component.
      Returns:
      the value of the section record component
    • since

      public String since()
      Returns the value of the since record component.
      Returns:
      the value of the since record component
    • id

      public String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component