Speed

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


Information about the current car speed.

Summary

Nested types

public final class Speed.Builder

A builder of Speed.

Public methods

boolean
@NonNull CarValue<Float>

Returns the display speed of the car in meters/second.

@NonNull CarValue<Float>

Returns the raw speed of the car in meters/second.

@NonNull CarValue<Integer>

Returns the units used to display speed from the car settings.

int
@NonNull String

Public methods

equals

Added in 1.4.0-rc02
public boolean equals(@Nullable Object other)

getDisplaySpeedMetersPerSecond

Added in 1.1.0
public @NonNull CarValue<FloatgetDisplaySpeedMetersPerSecond()

Returns the display speed of the car in meters/second.

Some cars display a slightly slower speed than the actual speed. This is usually displayed on the speedometer.

The value is positive when the vehicle is moving forward, negative when moving backwards and zero when stopped.

getRawSpeedMetersPerSecond

Added in 1.1.0
public @NonNull CarValue<FloatgetRawSpeedMetersPerSecond()

Returns the raw speed of the car in meters/second.

The value is positive when the vehicle is moving forward, negative when moving backwards and zero when stopped.

getSpeedDisplayUnit

Added in 1.1.0
public @NonNull CarValue<IntegergetSpeedDisplayUnit()

Returns the units used to display speed from the car settings.

See CarUnit for valid speed units.

hashCode

Added in 1.4.0-rc02
public int hashCode()

toString

Added in 1.4.0-rc02
public @NonNull String toString()