Package net.apartium.cocoabeans.commands
Record Class HelpMenuEntry
java.lang.Object
java.lang.Record
net.apartium.cocoabeans.commands.HelpMenuEntry
- Record Components:
label- the label of the commandinfo- detailed information about the command, including descriptions and usage examplesrequirements- the set of requirements that must be met to execute the commandsection- the section or category to which this command belongs in the help menusince- the version since this command has been availableid- 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 Summary
ConstructorsConstructorDescriptionHelpMenuEntry(String label, CommandInfo info, Set<Requirement> requirements, String section, String since, String id) Creates an instance of aHelpMenuEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.info()Returns the value of theinforecord component.label()Returns the value of thelabelrecord component.Returns the value of therequirementsrecord component.section()Returns the value of thesectionrecord component.since()Returns the value of thesincerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
HelpMenuEntry
public HelpMenuEntry(String label, CommandInfo info, Set<Requirement> requirements, String section, String since, String id) Creates an instance of aHelpMenuEntryrecord class.- Parameters:
label- the value for thelabelrecord componentinfo- the value for theinforecord componentrequirements- the value for therequirementsrecord componentsection- the value for thesectionrecord componentsince- the value for thesincerecord componentid- the value for theidrecord component
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
label
Returns the value of thelabelrecord component.- Returns:
- the value of the
labelrecord component
-
info
Returns the value of theinforecord component.- Returns:
- the value of the
inforecord component
-
requirements
Returns the value of therequirementsrecord component.- Returns:
- the value of the
requirementsrecord component
-
section
Returns the value of thesectionrecord component.- Returns:
- the value of the
sectionrecord component
-
since
Returns the value of thesincerecord component.- Returns:
- the value of the
sincerecord component
-
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-