Record Class InputEvent.DeviceConnectionChanged
java.lang.Object
java.lang.Record
dev.engine.core.input.InputEvent.DeviceConnectionChanged
- All Implemented Interfaces:
DeviceEvent, InputEvent
- Enclosing interface:
InputEvent
public static record InputEvent.DeviceConnectionChanged(Time time, DeviceId device, boolean connected)
extends Record
implements DeviceEvent
-
Nested Class Summary
Nested classes/interfaces inherited from interface InputEvent
InputEvent.CharTyped, InputEvent.CursorMoved, InputEvent.DeviceConnectionChanged, InputEvent.GamepadAxisMoved, InputEvent.GamepadPressed, InputEvent.GamepadReleased, InputEvent.KeyPressed, InputEvent.KeyReleased, InputEvent.KeyRepeated, InputEvent.MousePressed, InputEvent.MouseReleased, InputEvent.Scrolled -
Constructor Summary
ConstructorsConstructorDescriptionDeviceConnectionChanged(Time time, DeviceId device, boolean connected) Creates an instance of aDeviceConnectionChangedrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theconnectedrecord component.device()Returns the value of thedevicerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.time()Returns the value of thetimerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DeviceConnectionChanged
Creates an instance of aDeviceConnectionChangedrecord class.- Parameters:
time- the value for thetimerecord componentdevice- the value for thedevicerecord componentconnected- the value for theconnectedrecord 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. -
time
Returns the value of thetimerecord component.- Specified by:
timein interfaceInputEvent- Returns:
- the value of the
timerecord component
-
device
Returns the value of thedevicerecord component.- Specified by:
devicein interfaceDeviceEvent- Returns:
- the value of the
devicerecord component
-
connected
public boolean connected()Returns the value of theconnectedrecord component.- Returns:
- the value of the
connectedrecord component
-