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

    Constructors
    Constructor
    Description
    MouseMovementContext(int gameWidth, int gameHeight, long now, long availableBackdateMs, long millisSinceClick, long millisSinceMove, boolean forceFlush)
    Creates an instance of a MouseMovementContext record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Returns the value of the availableBackdateMs record component.
    double
     
    final boolean
    Indicates whether some other object is "equal to" this one.
    boolean
    Returns the value of the forceFlush record component.
    int
    Returns the value of the gameHeight record component.
    int
    Returns the value of the gameWidth record component.
    final int
    Returns a hash code value for this object.
    long
    Returns the value of the millisSinceClick record component.
    long
    Returns the value of the millisSinceMove record component.
    long
    now()
    Returns the value of the now record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • MouseMovementContext

      public MouseMovementContext(int gameWidth, int gameHeight, long now, long availableBackdateMs, long millisSinceClick, long millisSinceMove, boolean forceFlush)
      Creates an instance of a MouseMovementContext record class.
      Parameters:
      gameWidth - the value for the gameWidth record component
      gameHeight - the value for the gameHeight record component
      now - the value for the now record component
      availableBackdateMs - the value for the availableBackdateMs record component
      millisSinceClick - the value for the millisSinceClick record component
      millisSinceMove - the value for the millisSinceMove record component
      forceFlush - the value for the forceFlush record component
  • Method Details

    • clickIntensity

      public double clickIntensity()
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • gameWidth

      public int gameWidth()
      Returns the value of the gameWidth record component.
      Returns:
      the value of the gameWidth record component
    • gameHeight

      public int gameHeight()
      Returns the value of the gameHeight record component.
      Returns:
      the value of the gameHeight record component
    • now

      public long now()
      Returns the value of the now record component.
      Returns:
      the value of the now record component
    • availableBackdateMs

      public long availableBackdateMs()
      Returns the value of the availableBackdateMs record component.
      Returns:
      the value of the availableBackdateMs record component
    • millisSinceClick

      public long millisSinceClick()
      Returns the value of the millisSinceClick record component.
      Returns:
      the value of the millisSinceClick record component
    • millisSinceMove

      public long millisSinceMove()
      Returns the value of the millisSinceMove record component.
      Returns:
      the value of the millisSinceMove record component
    • forceFlush

      public boolean forceFlush()
      Returns the value of the forceFlush record component.
      Returns:
      the value of the forceFlush record component