Record Class NativeUiInputRouter.Control<K>
java.lang.Object
java.lang.Record
com.viaversion.viafabricplus.bedrock.screen.ui.NativeUiInputRouter.Control<K>
- Enclosing class:
NativeUiInputRouter<K>
public static record NativeUiInputRouter.Control<K>(K key, NativeUiInput.State state, Supplier<NativeUiInput.Context> context, Consumer<NativeUiInput.ButtonEvent> handler, boolean registered)
extends Record
Captured controls remain addressable after they leave the normal input order.
-
Constructor Summary
ConstructorsConstructorDescriptionControl(K key, NativeUiInput.State state, Supplier<NativeUiInput.Context> context, Consumer<NativeUiInput.ButtonEvent> handler, boolean registered) Creates an instance of aControlrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncontext()Returns the value of thecontextrecord component.final booleanIndicates whether some other object is "equal to" this one.handler()Returns the value of thehandlerrecord component.final inthashCode()Returns a hash code value for this object.key()Returns the value of thekeyrecord component.booleanReturns the value of theregisteredrecord component.state()Returns the value of thestaterecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Control
public Control(K key, NativeUiInput.State state, Supplier<NativeUiInput.Context> context, Consumer<NativeUiInput.ButtonEvent> handler, boolean registered) Creates an instance of aControlrecord class.- Parameters:
key- the value for thekeyrecord componentstate- the value for thestaterecord componentcontext- the value for thecontextrecord componenthandler- the value for thehandlerrecord componentregistered- the value for theregisteredrecord 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. -
key
Returns the value of thekeyrecord component.- Returns:
- the value of the
keyrecord component
-
state
Returns the value of thestaterecord component.- Returns:
- the value of the
staterecord component
-
context
Returns the value of thecontextrecord component.- Returns:
- the value of the
contextrecord component
-
handler
Returns the value of thehandlerrecord component.- Returns:
- the value of the
handlerrecord component
-
registered
public boolean registered()Returns the value of theregisteredrecord component.- Returns:
- the value of the
registeredrecord component
-