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
ConstructorsConstructorDescriptionStDeviceLocation(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 TypeMethodDescriptiondoubleaccuracy()Returns the value of theaccuracyrecord component.doublealtitude()Returns the value of thealtituderecord component.doublebearing()Returns the value of thebearingrecord component.doubleReturns the value of thebearingAccuracyrecord component.device()Returns the value of thedevicerecord component.final booleanIndicates whether some other object is "equal to" this one.static StDeviceLocationfinal inthashCode()Returns a hash code value for this object.longid()Returns the value of theidrecord component.doublelatitude()Returns the value of thelatituderecord component.doubleReturns the value of thelongituderecord component.doubleReturns the value of themslAltituderecord component.doubleReturns the value of themslAltitudeAccuracyrecord component.doublespeed()Returns the value of thespeedrecord component.doubleReturns the value of thespeedAccuracyrecord component.time()Returns the value of thetimerecord component.toMap()final StringtoString()Returns a string representation of this record class.
-
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 IDdevice- The location devicetime- The location update time
-
-
Method Details
-
fromMap
public static StDeviceLocation fromMap(long id, UUID device, OffsetDateTime time, Map<String, String> data) -
toMap
-
toString
-
hashCode
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
id
public long id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
device
Returns the value of thedevicerecord component.- Returns:
- the value of the
devicerecord component
-
time
Returns the value of thetimerecord component.- Returns:
- the value of the
timerecord component
-
accuracy
@JsonPropertyDescription("The estimated horizontal accuracy radius in meters of this location.") public double accuracy()Returns the value of theaccuracyrecord component.- Returns:
- the value of the
accuracyrecord component
-
altitude
@JsonPropertyDescription("The altitude of this location in meters above the WGS84 reference ellipsoid.") public double altitude()Returns the value of thealtituderecord component.- Returns:
- the value of the
altituderecord component
-
bearing
@JsonPropertyDescription("The bearing at the time of this location in degrees. ") public double bearing()Returns the value of thebearingrecord component.- Returns:
- the value of the
bearingrecord component
-
bearingAccuracy
@JsonPropertyDescription("The estimated bearing accuracy in degrees of this location.") public double bearingAccuracy()Returns the value of thebearingAccuracyrecord component.- Returns:
- the value of the
bearingAccuracyrecord component
-
latitude
@JsonPropertyDescription("The latitude in degrees.") public double latitude()Returns the value of thelatituderecord component.- Returns:
- the value of the
latituderecord component
-
longitude
@JsonPropertyDescription("The longitude in degrees.") public double longitude()Returns the value of thelongituderecord component.- Returns:
- the value of the
longituderecord component
-
mslAltitude
@JsonPropertyDescription("The Mean Sea Level altitude of this location in meters.") public double mslAltitude()Returns the value of themslAltituderecord component.- Returns:
- the value of the
mslAltituderecord component
-
mslAltitudeAccuracy
@JsonPropertyDescription("The estimated Mean Sea Level altitude accuracy in meters.") public double mslAltitudeAccuracy()Returns the value of themslAltitudeAccuracyrecord component.- Returns:
- the value of the
mslAltitudeAccuracyrecord component
-
speed
@JsonPropertyDescription("The speed at the time of this location in meters per second.") public double speed()Returns the value of thespeedrecord component.- Returns:
- the value of the
speedrecord component
-
speedAccuracy
@JsonPropertyDescription("The estimated speed accuracy in meters per second of this location.") public double speedAccuracy()Returns the value of thespeedAccuracyrecord component.- Returns:
- the value of the
speedAccuracyrecord component
-