Package dk.gtz.graphedit.util
Record Class Keymap.Keybind
java.lang.Object
java.lang.Record
dk.gtz.graphedit.util.Keymap.Keybind
- Record Components:
category- The category of the keybinding. Will not create a menubar item if empty.action- The action to run when the keybinding is pressed.description- A short description of the keybinding. Will be used for menu item text in the menubar
- Enclosing class:
- Keymap
public static record Keymap.Keybind(String category, Runnable action, String description)
extends Record
A record to store a graphedit keybinding.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaction()Returns the value of theactionrecord component.category()Returns the value of thecategoryrecord component.Returns the value of thedescriptionrecord 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
-
Keybind
Creates an instance of aKeybindrecord class.- Parameters:
category- the value for thecategoryrecord componentaction- the value for theactionrecord componentdescription- the value for thedescriptionrecord 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). -
category
Returns the value of thecategoryrecord component.- Returns:
- the value of the
categoryrecord component
-
action
Returns the value of theactionrecord component.- Returns:
- the value of the
actionrecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-