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 aKeyBinding
record class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
alt()
Returns the value of thealt
record component.int
altKey()
Returns the value of thealtKey
record component.boolean
ctrl()
Returns the value of thectrl
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.int
keyValue()
Returns the value of thekeyValue
record component.name()
Returns the value of thename
record component.boolean
shift()
Returns the value of theshift
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
KeyBinding
Creates an instance of aKeyBinding
record class.- Parameters:
name
- the value for thename
record componentkeyValue
- the value for thekeyValue
record componentaltKey
- the value for thealtKey
record componentshift
- the value for theshift
record componentctrl
- the value for thectrl
record componentalt
- the value for thealt
record 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 thecompare
method from their corresponding wrapper classes. -
name
Returns the value of thename
record component.- Returns:
- the value of the
name
record component
-
keyValue
public int keyValue()Returns the value of thekeyValue
record component.- Returns:
- the value of the
keyValue
record component
-
altKey
public int altKey()Returns the value of thealtKey
record component.- Returns:
- the value of the
altKey
record component
-
shift
public boolean shift()Returns the value of theshift
record component.- Returns:
- the value of the
shift
record component
-
ctrl
public boolean ctrl()Returns the value of thectrl
record component.- Returns:
- the value of the
ctrl
record component
-
alt
public boolean alt()Returns the value of thealt
record component.- Returns:
- the value of the
alt
record component
-