Package de.tum.cit.ase.editor.input
Record Class Shortcuts.Shortcut
java.lang.Object
java.lang.Record
de.tum.cit.ase.editor.input.Shortcuts.Shortcut
- Enclosing class:
- Shortcuts
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.int
key()
int[]
keys()
Returns the value of thekeys
record component.int[]
modKeys()
Returns an array of modifier keys seeKeyboardShortcut
.toString()
Returns a string representation of this record class.
-
Constructor Details
-
Shortcut
public Shortcut(int... keys) Creates an instance of aShortcut
record class.- Parameters:
keys
- the value for thekeys
record component
-
-
Method Details
-
key
public int key() -
modKeys
public int[] modKeys()Returns an array of modifier keys seeKeyboardShortcut
.- Returns:
- an array of modified keys, or null if there is only one key in the Shortcut.
-
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)
. -
keys
public int[] keys()Returns the value of thekeys
record component.- Returns:
- the value of the
keys
record component
-