Record Class IconCommand
java.lang.Object
java.lang.Record
net.islandearth.rpgregions.command.IconCommand
public record IconCommand(String command, IconCommand.CommandClickType clickType, int cooldown)
extends Record
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionIconCommand(String command, IconCommand.CommandClickType clickType, int cooldown) Creates an instance of aIconCommandrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theclickTyperecord component.command()Returns the value of thecommandrecord component.intcooldown()Returns the value of thecooldownrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
IconCommand
Creates an instance of aIconCommandrecord class.- Parameters:
command- the value for thecommandrecord componentclickType- the value for theclickTyperecord componentcooldown- the value for thecooldownrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
command
Returns the value of thecommandrecord component.- Returns:
- the value of the
commandrecord component
-
clickType
Returns the value of theclickTyperecord component.- Returns:
- the value of the
clickTyperecord component
-
cooldown
public int cooldown()Returns the value of thecooldownrecord component.- Returns:
- the value of the
cooldownrecord component
-