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

*** ** * ** ***


```
@CarProtocol
@RequiresCarApi(value = 5)
public final 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.

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

## Summary

| ### Nested types |
|---|
| `public final class https://developer.android.com/reference/androidx/car/app/hardware/common/CarZone.Builder` A builder for instantiating `https://developer.android.com/reference/androidx/car/app/hardware/common/CarZone`. |

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

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/car/app/hardware/common/CarZone#equals(java.lang.Object)(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/Object.html object)` |
| `int` | `https://developer.android.com/reference/androidx/car/app/hardware/common/CarZone#getColumn()()` Returns one of the values in CarZoneColumn. |
| `int` | `https://developer.android.com/reference/androidx/car/app/hardware/common/CarZone#getRow()()` Returns one of the values in CarZoneRow. |
| `int` | `https://developer.android.com/reference/androidx/car/app/hardware/common/CarZone#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/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)

```
public static final int CAR_ZONE_COLUMN_ALL = 16
```

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)

```
public static final int CAR_ZONE_COLUMN_CENTER = 48
```

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)

```
public static final int CAR_ZONE_COLUMN_DRIVER = 80
```

Refers to either `https://developer.android.com/reference/androidx/car/app/hardware/common/CarZone#CAR_ZONE_COLUMN_LEFT()` or `https://developer.android.com/reference/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)

```
public static final int CAR_ZONE_COLUMN_LEFT = 32
```

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)

```
public static final int CAR_ZONE_COLUMN_PASSENGER = 96
```

Refers to either `https://developer.android.com/reference/androidx/car/app/hardware/common/CarZone#CAR_ZONE_COLUMN_LEFT()` or `https://developer.android.com/reference/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)

```
public static final int CAR_ZONE_COLUMN_RIGHT = 64
```

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)

```
public static final CarZone CAR_ZONE_GLOBAL
```

Refers to the global zone, represented by `https://developer.android.com/reference/androidx/car/app/hardware/common/CarZone#CAR_ZONE_ROW_ALL()`, `https://developer.android.com/reference/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)

```
public static final int CAR_ZONE_ROW_ALL = 0
```

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)

```
public static final int CAR_ZONE_ROW_EXCLUDE_FIRST = 4
```

Refers to the all rows, except for `https://developer.android.com/reference/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)

```
public static final int CAR_ZONE_ROW_FIRST = 1
```

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)

```
public static final int CAR_ZONE_ROW_SECOND = 2
```

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)

```
public static final int CAR_ZONE_ROW_THIRD = 3
```

Refers to the third row of the vehicle only.

## Public methods

### equals

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

### getColumn

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

```
public int getColumn()
```

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)

```
public int getRow()
```

Returns one of the values in CarZoneRow.

### hashCode

```
public int hashCode()
```

### toString

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