Module technology.sola.engine
Record Class MouseWheelControlInputCondition
java.lang.Object
java.lang.Record
technology.sola.engine.assets.input.MouseWheelControlInputCondition
- Record Components:
state
- theMouseWheelControlInputCondition.State
needed to be considered active
- All Implemented Interfaces:
ControlInputCondition<MouseWheelControlInputCondition.State>
@NullMarked
public record MouseWheelControlInputCondition(MouseWheelControlInputCondition.State state)
extends Record
implements ControlInputCondition<MouseWheelControlInputCondition.State>
MouseWheelControlInputCondition is a
ControlInputCondition
to check if the mouse wheel is in an active state.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
The possible states forMouseWheelControlInputCondition
. -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of aMouseWheelControlInputCondition
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
isActive
(KeyboardInput keyboardInput, MouseInput mouseInput) Checks the state of the input to see if the condition is active or not.state()
Returns the value of thestate
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
MouseWheelControlInputCondition
Creates an instance of aMouseWheelControlInputCondition
record class.- Parameters:
state
- the value for thestate
record component
-
-
Method Details
-
isActive
Description copied from interface:ControlInputCondition
Checks the state of the input to see if the condition is active or not.- Specified by:
isActive
in interfaceControlInputCondition<MouseWheelControlInputCondition.State>
- Parameters:
keyboardInput
- theKeyboardInput
mouseInput
- theMouseInput
- Returns:
- true if the condition is active
-
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 withObjects::equals(Object,Object)
. -
state
Returns the value of thestate
record component.- Specified by:
state
in interfaceControlInputCondition<MouseWheelControlInputCondition.State>
- Returns:
- the value of the
state
record component
-