Record Class Core.KeyBinding
java.lang.Object
java.lang.Record
zombie.core.Core.KeyBinding
-
Constructor Summary
ConstructorsConstructorDescriptionKeyBinding(String name, int keyValue, int altKey, boolean shift, boolean ctrl, boolean alt) Creates an instance of aKeyBindingrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanalt()Returns the value of thealtrecord component.intaltKey()Returns the value of thealtKeyrecord component.booleanctrl()Returns the value of thectrlrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intkeyValue()Returns the value of thekeyValuerecord component.name()Returns the value of thenamerecord component.booleanshift()Returns the value of theshiftrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
KeyBinding
Creates an instance of aKeyBindingrecord class.- Parameters:
name- the value for thenamerecord componentkeyValue- the value for thekeyValuerecord componentaltKey- the value for thealtKeyrecord componentshift- the value for theshiftrecord componentctrl- the value for thectrlrecord componentalt- the value for thealtrecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
keyValue
public int keyValue()Returns the value of thekeyValuerecord component.- Returns:
- the value of the
keyValuerecord component
-
altKey
public int altKey()Returns the value of thealtKeyrecord component.- Returns:
- the value of the
altKeyrecord component
-
shift
public boolean shift()Returns the value of theshiftrecord component.- Returns:
- the value of the
shiftrecord component
-
ctrl
public boolean ctrl()Returns the value of thectrlrecord component.- Returns:
- the value of the
ctrlrecord component
-
alt
public boolean alt()Returns the value of thealtrecord component.- Returns:
- the value of the
altrecord component
-