Class Acceleration


  • public class Acceleration
    extends java.lang.Object
    Represents a reading taken from the AccelerometerService. By using a device's accelerometer the acceleration force in three physical axes can be determined.
    Since:
    3.0.0
    See Also:
    AccelerometerService
    • Constructor Summary

      Constructors 
      Constructor Description
      Acceleration​(double x, double y, double z, java.time.LocalDateTime timestamp)
      Creates a new immutable Acceleration instance with the given x, y, z, and timestamp values.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.time.LocalDateTime getTimestamp()
      Returns the timestamp of the reading
      double getX()
      Returns the x value of the reading.
      double getY()
      Returns the y value of the reading
      double getZ()
      Returns the z value of the reading
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Acceleration

        public Acceleration​(double x,
                            double y,
                            double z,
                            java.time.LocalDateTime timestamp)
        Creates a new immutable Acceleration instance with the given x, y, z, and timestamp values.
        Parameters:
        x - The x value of the reading
        y - The y value of the reading
        z - The z value of the reading
        timestamp - The instant at which the reading took place
    • Method Detail

      • getX

        public double getX()
        Returns the x value of the reading.
        Returns:
        The x value of the reading.
      • getY

        public double getY()
        Returns the y value of the reading
        Returns:
        The y value of the reading.
      • getZ

        public double getZ()
        Returns the z value of the reading
        Returns:
        The z value of the reading.
      • getTimestamp

        public java.time.LocalDateTime getTimestamp()
        Returns the timestamp of the reading
        Returns:
        The timestamp of the reading.