CarUnit


@CarProtocol
@RequiresCarApi(value = 3)
public final class CarUnit


Units such as speed, distance and volume for car hardware measurements and display.

Summary

Constants

static final int

Imperial Gallon unit.

static final int

Kilometer unit.

static final int

Kilometers per hour unit.

static final int

Liter unit.

static final int
METER = 2

Meter unit.

static final int

Meters per second unit.

static final int
MILE = 4

Miles unit.

static final int

Miles per hour unit.

static final int

Milliliter unit.

static final int

Millimeter unit.

static final int

US Gallon unit.

Public methods

static @NonNull String
toString(int unit)

Get a user friendly representation of the unit.

Constants

IMPERIAL_GALLON

Added in 1.1.0
@ExperimentalCarApi
public static final int IMPERIAL_GALLON = 204

Imperial Gallon unit.

KILOMETER

Added in 1.1.0
public static final int KILOMETER = 3

Kilometer unit.

KILOMETERS_PER_HOUR

Added in 1.1.0
public static final int KILOMETERS_PER_HOUR = 102

Kilometers per hour unit.

LITER

Added in 1.1.0
@ExperimentalCarApi
public static final int LITER = 202

Liter unit.

METER

Added in 1.1.0
public static final int METER = 2

Meter unit.

METERS_PER_SEC

Added in 1.1.0
public static final int METERS_PER_SEC = 101

Meters per second unit.

MILE

Added in 1.1.0
public static final int MILE = 4

Miles unit.

MILES_PER_HOUR

Added in 1.1.0
public static final int MILES_PER_HOUR = 103

Miles per hour unit.

MILLILITER

Added in 1.1.0
@ExperimentalCarApi
public static final int MILLILITER = 201

Milliliter unit.

MILLIMETER

Added in 1.1.0
public static final int MILLIMETER = 1

Millimeter unit.

US_GALLON

Added in 1.1.0
@ExperimentalCarApi
public static final int US_GALLON = 203

US Gallon unit.

Public methods

toString

Added in 1.2.0
public static @NonNull String toString(int unit)

Get a user friendly representation of the unit.