# Lane

# 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)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/car/app/navigation/model/Lane "View this page in Java")

<br />

```
@CarProtocol
class Lane
```

<br />

*** ** * ** ***

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

A[Lane](https://developer.android.com/reference/kotlin/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                                                                                                         |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `class `[Lane.Builder](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/Lane.Builder) A builder of[Lane](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/Lane). |

|                                                                                                                                                   ### Public functions                                                                                                                                                    |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                                                                                                                                                                                                                       | [equals](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/Lane#equals(java.lang.Object))`(other: `[Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)`?)`                                                                   |
| `(`[Mutable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)`)`[List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html)`<`[LaneDirection](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/LaneDirection)`!>` | [getDirections](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/Lane#getDirections())`()` Returns the list of directions a driver can take from this[Lane](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/Lane). |
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                                                                                                                                                                                                                                               | [hashCode](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/Lane#hashCode())`()`                                                                                                                                                                    |
| [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)                                                                                                                                                                                                                                         | [toString](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/Lane#toString())`()`                                                                                                                                                                    |

## Public functions

### equals

```
fun equals(other: Any?): Boolean
```  

### getDirections

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

```
fun getDirections(): (Mutable)List<LaneDirection!>
```

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

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

### hashCode

```
fun hashCode(): Int
```  

### toString

```
fun toString(): String
```