Record Class St1DataLocation

java.lang.Object
java.lang.Record
com.io7m.stonesignal.protocol.data.v1.St1DataLocation

public record St1DataLocation(long id, 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
    St1DataLocation(long id, OffsetDateTime time, double accuracy, double altitude, double bearing, double bearingAccuracy, double latitude, double longitude, double mslAltitude, double mslAltitudeAccuracy, double speed, double speedAccuracy)
    Creates an instance of a St1DataLocation record class.
  • 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.
    final boolean
    Indicates whether some other object is "equal to" this one.
    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

    • St1DataLocation

      public St1DataLocation(@JsonPropertyDescription("The location ID.") long id, @JsonPropertyDescription("The time the update was received.") 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)
      Creates an instance of a St1DataLocation record class.
      Parameters:
      id - the value for the id record component
      time - the value for the time record component
      accuracy - the value for the accuracy record component
      altitude - the value for the altitude record component
      bearing - the value for the bearing record component
      bearingAccuracy - the value for the bearingAccuracy record component
      latitude - the value for the latitude record component
      longitude - the value for the longitude record component
      mslAltitude - the value for the mslAltitude record component
      mslAltitudeAccuracy - the value for the mslAltitudeAccuracy record component
      speed - the value for the speed record component
      speedAccuracy - the value for the speedAccuracy record component
  • Method Details

    • 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

      @JsonPropertyDescription("The location ID.") public long id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • time

      @JsonPropertyDescription("The time the update was received.") 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