# CarZone

# CarZone

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/common/CarZone.java+class:androidx.car.app.hardware.common.CarZone)  
Added in[1.3.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.3.0)

*** ** * ** ***

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

<br />

```
@CarProtocol
@RequiresCarApi(value = 5)
@ExperimentalCarApi
class CarZone
```

<br />

*** ** * ** ***

Allows specification of a car zone using rows and columns. For example, CarZone.Driver allows modification of Driver's seat controls without knowing whether it is a left side driving car or right side driving car. This class is different from CarOccupantZoneManager in that CarZone is specifically for AndroidX APIs' implementation to control car features such as temperature based on zones while CarOccupantZoneManager class provides APIs to get displays and users information.

[getCarZones](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/common/CarValue#getCarZones())returns a list of these[CarZone](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/common/CarZone)s. It indicates the[CarValue](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/common/CarValue)happens in those[CarValue](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/common/CarValue)s of the vehicle.

## Summary

|                                                                                                                     ### Nested types                                                                                                                      |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `class `[CarZone.Builder](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/common/CarZone.Builder) A builder for instantiating[CarZone](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/common/CarZone). |

|                                                 ### Constants                                                 |
|---------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                           | [CAR_ZONE_COLUMN_ALL](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/common/CarZone#CAR_ZONE_COLUMN_ALL())` = 16` Refers to all the columns in the vehicle.                                                                                                                                                                                                                                                                                                             |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                           | [CAR_ZONE_COLUMN_CENTER](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/common/CarZone#CAR_ZONE_COLUMN_CENTER())` = 48` Refers to the center column of the vehicle only.                                                                                                                                                                                                                                                                                                |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                           | [CAR_ZONE_COLUMN_DRIVER](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/common/CarZone#CAR_ZONE_COLUMN_DRIVER())` = 80` Refers to either[CAR_ZONE_COLUMN_LEFT](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/common/CarZone#CAR_ZONE_COLUMN_LEFT())or[CAR_ZONE_COLUMN_RIGHT](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/common/CarZone#CAR_ZONE_COLUMN_RIGHT()), depending on the vehicle configuration.       |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                           | [CAR_ZONE_COLUMN_LEFT](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/common/CarZone#CAR_ZONE_COLUMN_LEFT())` = 32` Refers to the left-most column of the vehicle only.                                                                                                                                                                                                                                                                                                 |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                           | [CAR_ZONE_COLUMN_PASSENGER](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/common/CarZone#CAR_ZONE_COLUMN_PASSENGER())` = 96` Refers to either[CAR_ZONE_COLUMN_LEFT](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/common/CarZone#CAR_ZONE_COLUMN_LEFT())or[CAR_ZONE_COLUMN_RIGHT](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/common/CarZone#CAR_ZONE_COLUMN_RIGHT()), depending on the vehicle configuration. |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                           | [CAR_ZONE_COLUMN_RIGHT](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/common/CarZone#CAR_ZONE_COLUMN_RIGHT())` = 64` Refers to the right-most column of the vehicle only.                                                                                                                                                                                                                                                                                              |
| `const `[CarZone](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/common/CarZone)`!` | [CAR_ZONE_GLOBAL](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/common/CarZone#CAR_ZONE_GLOBAL()) Refers to the global zone, represented by[CAR_ZONE_ROW_ALL](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/common/CarZone#CAR_ZONE_ROW_ALL()),[CAR_ZONE_COLUMN_ALL](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/common/CarZone#CAR_ZONE_COLUMN_ALL()).                                                        |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                           | [CAR_ZONE_ROW_ALL](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/common/CarZone#CAR_ZONE_ROW_ALL())` = 0` Refers to all the rows in the vehicle.                                                                                                                                                                                                                                                                                                                       |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                           | [CAR_ZONE_ROW_EXCLUDE_FIRST](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/common/CarZone#CAR_ZONE_ROW_EXCLUDE_FIRST())` = 4` Refers to the all rows, except for[CAR_ZONE_ROW_FIRST](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/common/CarZone#CAR_ZONE_ROW_FIRST())of the vehicle.                                                                                                                                                      |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                           | [CAR_ZONE_ROW_FIRST](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/common/CarZone#CAR_ZONE_ROW_FIRST())` = 1` Refers to the front row of the vehicle only.                                                                                                                                                                                                                                                                                                             |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                           | [CAR_ZONE_ROW_SECOND](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/common/CarZone#CAR_ZONE_ROW_SECOND())` = 2` Refers to the second row of the vehicle only.                                                                                                                                                                                                                                                                                                          |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                           | [CAR_ZONE_ROW_THIRD](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/common/CarZone#CAR_ZONE_ROW_THIRD())` = 3` Refers to the third row of the vehicle only.                                                                                                                                                                                                                                                                                                             |

|                                ### Public functions                                 |
|-------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | [equals](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/common/CarZone#equals(java.lang.Object))`(object: `[Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)`?)` |
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)         | [getColumn](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/common/CarZone#getColumn())`()` Returns one of the values in CarZoneColumn.                                                     |
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)         | [getRow](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/common/CarZone#getRow())`()` Returns one of the values in CarZoneRow.                                                              |
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)         | [hashCode](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/common/CarZone#hashCode())`()`                                                                                                   |
| [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)   | [toString](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/common/CarZone#toString())`()`                                                                                                   |

## Constants

### CAR_ZONE_COLUMN_ALL

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

```
const val CAR_ZONE_COLUMN_ALL = 16: Int
```

Refers to all the columns in the vehicle.  

### CAR_ZONE_COLUMN_CENTER

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

```
const val CAR_ZONE_COLUMN_CENTER = 48: Int
```

Refers to the center column of the vehicle only.  

### CAR_ZONE_COLUMN_DRIVER

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

```
const val CAR_ZONE_COLUMN_DRIVER = 80: Int
```

Refers to either[CAR_ZONE_COLUMN_LEFT](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/common/CarZone#CAR_ZONE_COLUMN_LEFT())or[CAR_ZONE_COLUMN_RIGHT](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/common/CarZone#CAR_ZONE_COLUMN_RIGHT()), depending on the vehicle configuration.  

### CAR_ZONE_COLUMN_LEFT

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

```
const val CAR_ZONE_COLUMN_LEFT = 32: Int
```

Refers to the left-most column of the vehicle only.  

### CAR_ZONE_COLUMN_PASSENGER

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

```
const val CAR_ZONE_COLUMN_PASSENGER = 96: Int
```

Refers to either[CAR_ZONE_COLUMN_LEFT](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/common/CarZone#CAR_ZONE_COLUMN_LEFT())or[CAR_ZONE_COLUMN_RIGHT](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/common/CarZone#CAR_ZONE_COLUMN_RIGHT()), depending on the vehicle configuration.  

### CAR_ZONE_COLUMN_RIGHT

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

```
const val CAR_ZONE_COLUMN_RIGHT = 64: Int
```

Refers to the right-most column of the vehicle only.  

### CAR_ZONE_GLOBAL

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

```
const val CAR_ZONE_GLOBAL: CarZone!
```

Refers to the global zone, represented by[CAR_ZONE_ROW_ALL](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/common/CarZone#CAR_ZONE_ROW_ALL()),[CAR_ZONE_COLUMN_ALL](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/common/CarZone#CAR_ZONE_COLUMN_ALL()).  

### CAR_ZONE_ROW_ALL

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

```
const val CAR_ZONE_ROW_ALL = 0: Int
```

Refers to all the rows in the vehicle.  

### CAR_ZONE_ROW_EXCLUDE_FIRST

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

```
const val CAR_ZONE_ROW_EXCLUDE_FIRST = 4: Int
```

Refers to the all rows, except for[CAR_ZONE_ROW_FIRST](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/common/CarZone#CAR_ZONE_ROW_FIRST())of the vehicle.  

### CAR_ZONE_ROW_FIRST

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

```
const val CAR_ZONE_ROW_FIRST = 1: Int
```

Refers to the front row of the vehicle only.  

### CAR_ZONE_ROW_SECOND

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

```
const val CAR_ZONE_ROW_SECOND = 2: Int
```

Refers to the second row of the vehicle only.  

### CAR_ZONE_ROW_THIRD

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

```
const val CAR_ZONE_ROW_THIRD = 3: Int
```

Refers to the third row of the vehicle only.  

## Public functions

### equals

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

### getColumn

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

```
fun getColumn(): Int
```

Returns one of the values in CarZoneColumn.  

### getRow

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

```
fun getRow(): Int
```

Returns one of the values in CarZoneRow.  

### hashCode

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

### toString

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