public interface

Distance

implements Comparable<Distance>
com.google.android.gms.nearby.messages.Distance

Class Overview

Represents the distance to a Message.

See also:

Summary

Nested Classes
@interface Distance.Accuracy Possible values for the accuracy of a distance estimate. 
Fields
public static final Distance UNKNOWN Represents an unknown distance, with accuracy = LOW, and meters = NaN.
Public Methods
abstract int compareTo(Distance other)
Note: This compares only getMeters(), not accuracy.
abstract int getAccuracy()
The accuracy of the distance estimate.
abstract double getMeters()
The distance estimate, in meters.
[Expand]
Inherited Methods
From interface java.lang.Comparable

Fields

public static final Distance UNKNOWN

Represents an unknown distance, with accuracy = LOW, and meters = NaN.

Public Methods

public abstract int compareTo (Distance other)

Note: This compares only getMeters(), not accuracy. We also consider NaN == NaN, so that UNKNOWN.equals(UNKNOWN).

Parameters
other Distance
Returns
int

public abstract int getAccuracy ()

The accuracy of the distance estimate.

Returns
int

public abstract double getMeters ()

The distance estimate, in meters.

Returns
double