目录

Distance

Interface Info

public interface Distance

距离信息相关接口。它由估算距离(单位:米)和估算精度组成。

Nested Class Summary

Qualifier and Type

Class Name and Description

@interface

Distance.Precision

距离估算精度值。

Public Field Summary

Qualifier and Type

Field and Description

static final Distance

DISTANCE_UNKNOWN

表示未知距离,其Precision为PRECISION_LOW,距离为NaN。

Public Method Summary

Qualifier and Type

Method Name and Description

int

compareTo(Distance distance)

与其他Distance对象进行比较。

double

getMeters()

获取估算的距离。

int

getPrecision()

获取距离估算的精度。

Public Fields

[h2]DISTANCE_UNKNOWN

Fields

public static final Distance DISTANCE_UNKNOWN

未知距离。

Constant Value:"precision = LOW, meters = NaN"

Public Methods

[h2]compareTo

Method

int compareTo(Distance distance)

与其他distance对象比较估算的距离。

Parameters

Name

Description

distance

需要估算的distance对象。

Returns

Type

Description

int

返回比较的结果。

[h2]getMeters

Method

double getMeters()

获取估算的距离。

Returns

Type

Description

double

返回估算的距离,单位:米。

[h2]getPrecision

Method

int getPrecision()

获取距离估算的精度。

Returns

Type

Description

int

返回距离估算的精度。