Package top.untold.frostlumen.core.data
Record Class InputModifiers
java.lang.Object
java.lang.Record
top.untold.frostlumen.core.data.InputModifiers
public record InputModifiers(boolean isShiftPressed, boolean isControlPressed, boolean isAltPressed, boolean isSuperPressed, boolean isCapsLockEnabled, boolean isNumberLockEnabled)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionInputModifiers(boolean isShiftPressed, boolean isControlPressed, boolean isAltPressed, boolean isSuperPressed, boolean isCapsLockEnabled, boolean isNumberLockEnabled) Creates an instance of aInputModifiersrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static InputModifiersfromGLFWValue(int modifiers) final inthashCode()Returns a hash code value for this object.booleanReturns the value of theisAltPressedrecord component.booleanReturns the value of theisCapsLockEnabledrecord component.booleanReturns the value of theisControlPressedrecord component.booleanReturns the value of theisNumberLockEnabledrecord component.booleanReturns the value of theisShiftPressedrecord component.booleanReturns the value of theisSuperPressedrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
InputModifiers
public InputModifiers(boolean isShiftPressed, boolean isControlPressed, boolean isAltPressed, boolean isSuperPressed, boolean isCapsLockEnabled, boolean isNumberLockEnabled) Creates an instance of aInputModifiersrecord class.- Parameters:
isShiftPressed- the value for theisShiftPressedrecord componentisControlPressed- the value for theisControlPressedrecord componentisAltPressed- the value for theisAltPressedrecord componentisSuperPressed- the value for theisSuperPressedrecord componentisCapsLockEnabled- the value for theisCapsLockEnabledrecord componentisNumberLockEnabled- the value for theisNumberLockEnabledrecord component
-
-
Method Details
-
fromGLFWValue
-
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 with '=='. -
isShiftPressed
public boolean isShiftPressed()Returns the value of theisShiftPressedrecord component.- Returns:
- the value of the
isShiftPressedrecord component
-
isControlPressed
public boolean isControlPressed()Returns the value of theisControlPressedrecord component.- Returns:
- the value of the
isControlPressedrecord component
-
isAltPressed
public boolean isAltPressed()Returns the value of theisAltPressedrecord component.- Returns:
- the value of the
isAltPressedrecord component
-
isSuperPressed
public boolean isSuperPressed()Returns the value of theisSuperPressedrecord component.- Returns:
- the value of the
isSuperPressedrecord component
-
isCapsLockEnabled
public boolean isCapsLockEnabled()Returns the value of theisCapsLockEnabledrecord component.- Returns:
- the value of the
isCapsLockEnabledrecord component
-
isNumberLockEnabled
public boolean isNumberLockEnabled()Returns the value of theisNumberLockEnabledrecord component.- Returns:
- the value of the
isNumberLockEnabledrecord component
-