# TollCard.Builder

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

*** ** * ** ***


```
public final class TollCard.Builder
```

<br />

*** ** * ** ***

A builder of `https://developer.android.com/reference/androidx/car/app/hardware/info/TollCard`.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/car/app/hardware/info/TollCard.Builder#Builder()()` |

| ### Public methods |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/hardware/info/TollCard` | `https://developer.android.com/reference/androidx/car/app/hardware/info/TollCard.Builder#build()()` Constructs the `https://developer.android.com/reference/androidx/car/app/hardware/info/TollCard` defined by this builder. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/hardware/info/TollCard.Builder` | `https://developer.android.com/reference/androidx/car/app/hardware/info/TollCard.Builder#setCardState(androidx.car.app.hardware.common.CarValue<java.lang.Integer>)(@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> cardState)` Sets the toll card state. |

## Public constructors

### Builder

Added in 1.1.0

```
public Builder()
```

## Public methods

### build

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

```
public @NonNull TollCard build()
```

Constructs the `https://developer.android.com/reference/androidx/car/app/hardware/info/TollCard` defined by this builder.

### setCardState

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

```
public @NonNull TollCard.Builder setCardState(@NonNull CarValue<Integer> cardState)
```

Sets the toll card state.

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/NullPointerException.html` | if `cardState` is `null` |