-
- All Implemented Interfaces:
-
com.polygamma.ogm.util.ProtobufMessage
public final class LocationDescriptor implements ProtobufMessage
Location descriptor.
-
-
Method Summary
Modifier and Type Method Description static LocationDescriptorof()Construct new empty descriptor. static LocationDescriptorofLocation(Location loc)Construct new descriptor from location. LocationDescriptormergeFrom(ProtobufReader reader)Read and merge from Protobuf wire-codec reader. voidwriteTo(ProtobufWriter writer)Write {@code this}to a Protobuf wire-codec writer.longtimestampSeconds()UNIX epoch timestamp, in seconds, of when location was queried. doublelatitudeDegrees()Latitude, in degrees, of location. doublelongitudeDegrees()Longitude, in degrees, of location. booleanhasHorizontal()Test whether horizontal location is present. doublealtitudeMeters()Altitude, in meters above WGS84 reference ellipsoid, of location. booleanhasVertical()Test whether vertical location is present. floathorizontalAccuracyMeters()Accuracy of latitude and longitude, in meters. booleanhasHorizontalAccuracy()Test whether accuracy of horizontal location is present. floatverticalAccuracyMeters()Accuracy of altitude, in meters. booleanhasVerticalAccuracy()Test whether accuracy of vertical location is present. floatspeedMetersPerSecond()Speed, in meters per second, of location. booleanhasSpeed()Test whether speed is present. floatspeedAccuracyMetersPerSecond()Accuracy of speed, in meters per second. booleanhasSpeedAccuracy()Test whether accuracy of speed is present. booleanisEmpty()Test whether descriptor is empty. inthashCode()booleanequals(@Nullable() Object other)StringtoString()-
-
Method Detail
-
of
static LocationDescriptor of()
Construct new empty descriptor.
-
ofLocation
static LocationDescriptor ofLocation(Location loc)
Construct new descriptor from location.
- Parameters:
loc- location to construct from
-
mergeFrom
LocationDescriptor mergeFrom(ProtobufReader reader)
Read and merge from Protobuf wire-codec reader.
- Parameters:
reader- reader to merge from
-
writeTo
void writeTo(ProtobufWriter writer)
Write
{@code this}to a Protobuf wire-codec writer.- Parameters:
writer- writer to write to
-
timestampSeconds
long timestampSeconds()
UNIX epoch timestamp, in seconds, of when location was queried.
-
latitudeDegrees
double latitudeDegrees()
Latitude, in degrees, of location.
-
longitudeDegrees
double longitudeDegrees()
Longitude, in degrees, of location.
-
hasHorizontal
boolean hasHorizontal()
Test whether horizontal location is present.
-
altitudeMeters
double altitudeMeters()
Altitude, in meters above WGS84 reference ellipsoid, of location.
-
hasVertical
boolean hasVertical()
Test whether vertical location is present.
-
horizontalAccuracyMeters
float horizontalAccuracyMeters()
-
hasHorizontalAccuracy
boolean hasHorizontalAccuracy()
Test whether accuracy of horizontal location is present.
-
verticalAccuracyMeters
float verticalAccuracyMeters()
Accuracy of altitude, in meters.
-
hasVerticalAccuracy
boolean hasVerticalAccuracy()
Test whether accuracy of vertical location is present.
-
speedMetersPerSecond
float speedMetersPerSecond()
Speed, in meters per second, of location.
-
hasSpeed
boolean hasSpeed()
Test whether speed is present.
-
speedAccuracyMetersPerSecond
float speedAccuracyMetersPerSecond()
Accuracy of speed, in meters per second.
-
hasSpeedAccuracy
boolean hasSpeedAccuracy()
Test whether accuracy of speed is present.
-
hashCode
int hashCode()
-
-
-
-