Mileage


@CarProtocol
@RequiresCarApi(value = 3)
class Mileage


Information about car mileage.

Summary

Nested types

A builder of Mileage.

Public functions

Boolean
equals(other: Any?)
CarValue<Int!>

Returns the distance display unit from the car hardware.

CarValue<Float!>

Returns the value of the odometer from the car hardware in kilometers.

CarValue<Float!>

This function is deprecated.

use getOdometerInKilometers which does the same as this method, except that the correct units are in the API name

Int
String

Public functions

equals

fun equals(other: Any?): Boolean

getDistanceDisplayUnit

Added in 1.1.0
fun getDistanceDisplayUnit(): CarValue<Int!>

Returns the distance display unit from the car hardware.

See CarUnit for possible distance values.

getOdometerInKilometers

Added in 1.8.0-alpha01
fun getOdometerInKilometers(): CarValue<Float!>

Returns the value of the odometer from the car hardware in kilometers. The precision of this value depends on the hardware implementation. Some vehicles may return whole kilomters, while others may return down to tenths or hundredths of a kilometer.

getOdometerMeters

Added in 1.1.0
Deprecated in 1.8.0-alpha01
fun getOdometerMeters(): CarValue<Float!>

Returns the value of the odometer from the car hardware in KILOMETERS. Despite the name "meters", this method actually returns the odometer in kilometers. It was incorrectly introduced as meters and due to backwards compatibility concerns, can no longer be renamed or removed.

hashCode

fun hashCode(): Int

toString

fun toString(): String