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

*** ** * ** ***


```
public final class Place.Builder
```

<br />

*** ** * ** ***

A builder of `https://developer.android.com/reference/androidx/car/app/model/Place`.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/car/app/model/Place.Builder#Builder(androidx.car.app.model.CarLocation)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/model/CarLocation location)` Returns a builder instance for a `https://developer.android.com/reference/androidx/car/app/model/CarLocation`. |
| `https://developer.android.com/reference/androidx/car/app/model/Place.Builder#Builder(androidx.car.app.model.Place)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/model/Place place)` Returns a `https://developer.android.com/reference/androidx/car/app/model/Place.Builder` instance with the same data as the given `https://developer.android.com/reference/androidx/car/app/model/Place` instance. |

| ### Public methods |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/model/Place` | `https://developer.android.com/reference/androidx/car/app/model/Place.Builder#build()()` Constructs the `https://developer.android.com/reference/androidx/car/app/model/Place` defined by this builder. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/model/Place.Builder` | `https://developer.android.com/reference/androidx/car/app/model/Place.Builder#setMarker(androidx.car.app.model.PlaceMarker)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/model/PlaceMarker marker)` Sets the `https://developer.android.com/reference/androidx/car/app/model/PlaceMarker` that specifies how this place is to be displayed on a map. |

## Public constructors

### Builder

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

```
public Builder(@NonNull CarLocation location)
```

Returns a builder instance for a `https://developer.android.com/reference/androidx/car/app/model/CarLocation`.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/model/CarLocation location` | the geographical location associated with the place |

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

### Builder

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

```
public Builder(@NonNull Place place)
```

Returns a `https://developer.android.com/reference/androidx/car/app/model/Place.Builder` instance with the same data as the given `https://developer.android.com/reference/androidx/car/app/model/Place` instance.

## Public methods

### build

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

```
public @NonNull Place build()
```

Constructs the `https://developer.android.com/reference/androidx/car/app/model/Place` defined by this builder.

### setMarker

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

```
public @NonNull Place.Builder setMarker(@NonNull PlaceMarker marker)
```

Sets the `https://developer.android.com/reference/androidx/car/app/model/PlaceMarker` that specifies how this place is to be displayed on a map.

Unless set with this method, the place will not have a marker.

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