# Lane

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/navigation/model/Lane.java+class:androidx.car.app.navigation.model.Lane) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.0.0)

*** ** * ** ***


```
@CarProtocol
public final class Lane
```

<br />

*** ** * ** ***

Configuration of a single lane of a road at a particular point in the navigation.

A `https://developer.android.com/reference/androidx/car/app/navigation/model/Lane` object describes all possible directions the driver could go from this lane, and indicates which directions the driver could take to stay on the navigation route.

## Summary

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

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/car/app/navigation/model/Lane#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/java/util/List.html<https://developer.android.com/reference/androidx/car/app/navigation/model/LaneDirection>` | `https://developer.android.com/reference/androidx/car/app/navigation/model/Lane#getDirections()()` Returns the list of directions a driver can take from this `https://developer.android.com/reference/androidx/car/app/navigation/model/Lane`. |
| `int` | `https://developer.android.com/reference/androidx/car/app/navigation/model/Lane#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/navigation/model/Lane#toString()()` |

## Public methods

### equals

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

### getDirections

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

```
public @NonNull List<LaneDirection> getDirections()
```

Returns the list of directions a driver can take from this `https://developer.android.com/reference/androidx/car/app/navigation/model/Lane`.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/car/app/navigation/model/Lane.Builder#addDirection(androidx.car.app.navigation.model.LaneDirection)` |   |

### hashCode

```
public int hashCode()
```

### toString

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