Package dev.twilite.game.mouse.model
Record Class MouseMovementContext
java.lang.Object
java.lang.Record
dev.twilite.game.mouse.model.MouseMovementContext
public record MouseMovementContext(int gameWidth, int gameHeight, long now, long availableBackdateMs, long millisSinceClick, long millisSinceMove, boolean forceFlush)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionMouseMovementContext(int gameWidth, int gameHeight, long now, long availableBackdateMs, long millisSinceClick, long millisSinceMove, boolean forceFlush) Creates an instance of aMouseMovementContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of theavailableBackdateMsrecord component.doublefinal booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of theforceFlushrecord component.intReturns the value of thegameHeightrecord component.intReturns the value of thegameWidthrecord component.final inthashCode()Returns a hash code value for this object.longReturns the value of themillisSinceClickrecord component.longReturns the value of themillisSinceMoverecord component.longnow()Returns the value of thenowrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MouseMovementContext
public MouseMovementContext(int gameWidth, int gameHeight, long now, long availableBackdateMs, long millisSinceClick, long millisSinceMove, boolean forceFlush) Creates an instance of aMouseMovementContextrecord class.- Parameters:
gameWidth- the value for thegameWidthrecord componentgameHeight- the value for thegameHeightrecord componentnow- the value for thenowrecord componentavailableBackdateMs- the value for theavailableBackdateMsrecord componentmillisSinceClick- the value for themillisSinceClickrecord componentmillisSinceMove- the value for themillisSinceMoverecord componentforceFlush- the value for theforceFlushrecord component
-
-
Method Details
-
clickIntensity
public double clickIntensity() -
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 '=='. -
gameWidth
public int gameWidth()Returns the value of thegameWidthrecord component.- Returns:
- the value of the
gameWidthrecord component
-
gameHeight
public int gameHeight()Returns the value of thegameHeightrecord component.- Returns:
- the value of the
gameHeightrecord component
-
now
public long now()Returns the value of thenowrecord component.- Returns:
- the value of the
nowrecord component
-
availableBackdateMs
public long availableBackdateMs()Returns the value of theavailableBackdateMsrecord component.- Returns:
- the value of the
availableBackdateMsrecord component
-
millisSinceClick
public long millisSinceClick()Returns the value of themillisSinceClickrecord component.- Returns:
- the value of the
millisSinceClickrecord component
-
millisSinceMove
public long millisSinceMove()Returns the value of themillisSinceMoverecord component.- Returns:
- the value of the
millisSinceMoverecord component
-
forceFlush
public boolean forceFlush()Returns the value of theforceFlushrecord component.- Returns:
- the value of the
forceFlushrecord component
-