Package dev.turboism.sdk.menu
Record Class MenuRegistry.SimpleMenuContribution
java.lang.Object
java.lang.Record
dev.turboism.sdk.menu.MenuRegistry.SimpleMenuContribution
- Record Components:
- slash-delimited menu pathactionId- action invoked on clickorder- position hint within the menu
- All Implemented Interfaces:
MenuRegistry.MenuContribution
- Enclosing interface:
- MenuRegistry
public static record MenuRegistry.SimpleMenuContribution(String menuPath, String actionId, int order)
extends Record
implements MenuRegistry.MenuContribution
Value-style
MenuRegistry.MenuContribution implementation.-
Constructor Summary
ConstructorsConstructorDescriptionSimpleMenuContribution(String menuPath, String actionId, int order) Creates an instance of aSimpleMenuContributionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionactionId()Returns the value of theactionIdrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.menuPath()Returns the value of themenuPathrecord component.intorder()Returns the value of theorderrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
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 '=='. -
actionId
Returns the value of theactionIdrecord component.- Specified by:
actionIdin interfaceMenuRegistry.MenuContribution- Returns:
- the value of the
actionIdrecord component
-
order
public int order()Returns the value of theorderrecord component.- Specified by:
orderin interfaceMenuRegistry.MenuContribution- Returns:
- the value of the
orderrecord component
-