# Speed

Artifact: [androidx.car.app:app](https://developer.android.com/jetpack/androidx/releases/car-app) [View Source](https://cs.android.com/search?q=file:androidx/car/app/hardware/info/Speed.java+class:androidx.car.app.hardware.info.Speed) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.1.0)

*** ** * ** ***


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

<br />

*** ** * ** ***

Information about the current car speed.

## Summary

| ### Nested types |
|---|
| `public final class https://developer.android.com/reference/androidx/car/app/hardware/info/Speed.Builder` A builder of `https://developer.android.com/reference/androidx/car/app/hardware/info/Speed`. |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/car/app/hardware/info/Speed#equals(java.lang.Object)(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/Object.html other)` |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/hardware/common/CarValue<https://developer.android.com/reference/java/lang/Float.html>` | `https://developer.android.com/reference/androidx/car/app/hardware/info/Speed#getDisplaySpeedMetersPerSecond()()` Returns the display speed of the car in meters/second. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/hardware/common/CarValue<https://developer.android.com/reference/java/lang/Float.html>` | `https://developer.android.com/reference/androidx/car/app/hardware/info/Speed#getRawSpeedMetersPerSecond()()` Returns the raw speed of the car in meters/second. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/hardware/common/CarValue<https://developer.android.com/reference/java/lang/Integer.html>` | `https://developer.android.com/reference/androidx/car/app/hardware/info/Speed#getSpeedDisplayUnit()()` Returns the units used to display speed from the car settings. |
| `int` | `https://developer.android.com/reference/androidx/car/app/hardware/info/Speed#hashCode()()` |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/car/app/hardware/info/Speed#toString()()` |

## Public methods

### equals

```
public boolean equals(@Nullable Object other)
```

### getDisplaySpeedMetersPerSecond

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.1.0)

```
public @NonNull CarValue<Float> getDisplaySpeedMetersPerSecond()
```

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

This is the value expected to be displayed on the speedometer.

Some cars may display a slightly higher speed than the actual speed.

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

### getRawSpeedMetersPerSecond

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.1.0)

```
public @NonNull CarValue<Float> getRawSpeedMetersPerSecond()
```

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](https://developer.android.com/jetpack/androidx/releases/car-app#1.1.0)

```
public @NonNull CarValue<Integer> getSpeedDisplayUnit()
```

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

See `https://developer.android.com/reference/androidx/car/app/hardware/common/CarUnit` for valid speed units.

### hashCode

```
public int hashCode()
```

### toString

```
public @NonNull String toString()
```