Record Class StDeviceLocation

java.lang.Object
java.lang.Record
com.io7m.stonesignal.server.devices.StDeviceLocation

public record StDeviceLocation(long id, UUID device, OffsetDateTime time, double accuracy, double altitude, double bearing, double bearingAccuracy, double latitude, double longitude, double mslAltitude, double mslAltitudeAccuracy, double speed, double speedAccuracy) extends Record
A location.
  • Constructor Summary

    Constructors
    Constructor
    Description
    StDeviceLocation(long id, UUID device, OffsetDateTime time, double accuracy, double altitude, double bearing, double bearingAccuracy, double latitude, double longitude, double mslAltitude, double mslAltitudeAccuracy, double speed, double speedAccuracy)
    A device location.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Returns the value of the accuracy record component.
    double
    Returns the value of the altitude record component.
    double
    Returns the value of the bearing record component.
    double
    Returns the value of the bearingAccuracy record component.
    Returns the value of the device record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    fromMap(long id, UUID device, OffsetDateTime time, Map<String,String> data)
     
    final int
    Returns a hash code value for this object.
    long
    id()
    Returns the value of the id record component.
    double
    Returns the value of the latitude record component.
    double
    Returns the value of the longitude record component.
    double
    Returns the value of the mslAltitude record component.
    double
    Returns the value of the mslAltitudeAccuracy record component.
    double
    Returns the value of the speed record component.
    double
    Returns the value of the speedAccuracy record component.
    Returns the value of the time record component.
     
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

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

    • StDeviceLocation

      public StDeviceLocation(long id, UUID device, OffsetDateTime time, @JsonPropertyDescription("The estimated horizontal accuracy radius in meters of this location.") double accuracy, @JsonPropertyDescription("The altitude of this location in meters above the WGS84 reference ellipsoid.") double altitude, @JsonPropertyDescription("The bearing at the time of this location in degrees. ") double bearing, @JsonPropertyDescription("The estimated bearing accuracy in degrees of this location.") double bearingAccuracy, @JsonPropertyDescription("The latitude in degrees.") double latitude, @JsonPropertyDescription("The longitude in degrees.") double longitude, @JsonPropertyDescription("The Mean Sea Level altitude of this location in meters.") double mslAltitude, @JsonPropertyDescription("The estimated Mean Sea Level altitude accuracy in meters.") double mslAltitudeAccuracy, @JsonPropertyDescription("The speed at the time of this location in meters per second.") double speed, @JsonPropertyDescription("The estimated speed accuracy in meters per second of this location.") double speedAccuracy)
      A device location.
      Parameters:
      id - The location update ID
      device - The location device
      time - The location update time
  • Method Details

    • fromMap

      public static StDeviceLocation fromMap(long id, UUID device, OffsetDateTime time, Map<String,String> data)
    • toMap

      public Map<String,String> toMap()
      Returns:
      The location data as a string map
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      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.
    • id

      public long id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • device

      public UUID device()
      Returns the value of the device record component.
      Returns:
      the value of the device record component
    • time

      public OffsetDateTime time()
      Returns the value of the time record component.
      Returns:
      the value of the time record component
    • accuracy

      @JsonPropertyDescription("The estimated horizontal accuracy radius in meters of this location.") public double accuracy()
      Returns the value of the accuracy record component.
      Returns:
      the value of the accuracy record component
    • altitude

      @JsonPropertyDescription("The altitude of this location in meters above the WGS84 reference ellipsoid.") public double altitude()
      Returns the value of the altitude record component.
      Returns:
      the value of the altitude record component
    • bearing

      @JsonPropertyDescription("The bearing at the time of this location in degrees. ") public double bearing()
      Returns the value of the bearing record component.
      Returns:
      the value of the bearing record component
    • bearingAccuracy

      @JsonPropertyDescription("The estimated bearing accuracy in degrees of this location.") public double bearingAccuracy()
      Returns the value of the bearingAccuracy record component.
      Returns:
      the value of the bearingAccuracy record component
    • latitude

      @JsonPropertyDescription("The latitude in degrees.") public double latitude()
      Returns the value of the latitude record component.
      Returns:
      the value of the latitude record component
    • longitude

      @JsonPropertyDescription("The longitude in degrees.") public double longitude()
      Returns the value of the longitude record component.
      Returns:
      the value of the longitude record component
    • mslAltitude

      @JsonPropertyDescription("The Mean Sea Level altitude of this location in meters.") public double mslAltitude()
      Returns the value of the mslAltitude record component.
      Returns:
      the value of the mslAltitude record component
    • mslAltitudeAccuracy

      @JsonPropertyDescription("The estimated Mean Sea Level altitude accuracy in meters.") public double mslAltitudeAccuracy()
      Returns the value of the mslAltitudeAccuracy record component.
      Returns:
      the value of the mslAltitudeAccuracy record component
    • speed

      @JsonPropertyDescription("The speed at the time of this location in meters per second.") public double speed()
      Returns the value of the speed record component.
      Returns:
      the value of the speed record component
    • speedAccuracy

      @JsonPropertyDescription("The estimated speed accuracy in meters per second of this location.") public double speedAccuracy()
      Returns the value of the speedAccuracy record component.
      Returns:
      the value of the speedAccuracy record component