Record Class BrigadierHelper.CommandHelpMeta
java.lang.Object
java.lang.Record
com.soulfiremc.server.command.brigadier.BrigadierHelper.CommandHelpMeta
- Enclosing class:
BrigadierHelper
-
Constructor Summary
ConstructorsConstructorDescriptionCommandHelpMeta
(@Nullable String help, boolean privateCommand) Creates an instance of aCommandHelpMeta
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.forPublicCommand
(String help) final int
hashCode()
Returns a hash code value for this object.@Nullable String
help()
Returns the value of thehelp
record component.boolean
Returns the value of theprivateCommand
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
CommandHelpMeta
Creates an instance of aCommandHelpMeta
record class.- Parameters:
help
- the value for thehelp
record componentprivateCommand
- the value for theprivateCommand
record component
-
-
Method Details
-
forPrivateCommand
-
forPublicCommand
-
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
help
Returns the value of thehelp
record component.- Returns:
- the value of the
help
record component
-
privateCommand
public boolean privateCommand()Returns the value of theprivateCommand
record component.- Returns:
- the value of the
privateCommand
record component
-