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

*** ** * ** ***


```
public final class EnergyProfile.Builder
```

<br />

*** ** * ** ***

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

## Summary

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

| ### Public methods |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/hardware/info/EnergyProfile` | `https://developer.android.com/reference/androidx/car/app/hardware/info/EnergyProfile.Builder#build()()` Constructs the `https://developer.android.com/reference/androidx/car/app/hardware/info/EnergyProfile` defined by this builder. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/hardware/info/EnergyProfile.Builder` | `https://developer.android.com/reference/androidx/car/app/hardware/info/EnergyProfile.Builder#setEvConnectorTypes(androidx.car.app.hardware.common.CarValue<java.util.List<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/util/List.html<https://developer.android.com/reference/java/lang/Integer.html>> evConnectorTypes)` Sets the cars EV connector types. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/car/app/hardware/info/EnergyProfile.Builder` | `https://developer.android.com/reference/androidx/car/app/hardware/info/EnergyProfile.Builder#setFuelTypes(androidx.car.app.hardware.common.CarValue<java.util.List<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/util/List.html<https://developer.android.com/reference/java/lang/Integer.html>> fuelTypes)` Sets the cars fuel types. |

## 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 EnergyProfile build()
```

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

Any fields which have not been set are added with `null` value and `https://developer.android.com/reference/androidx/car/app/hardware/common/CarValue#STATUS_UNIMPLEMENTED()`.

### setEvConnectorTypes

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

```
public @NonNull EnergyProfile.Builder setEvConnectorTypes(@NonNull CarValue<List<Integer>> evConnectorTypes)
```

Sets the cars EV connector types.

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

### setFuelTypes

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

```
public @NonNull EnergyProfile.Builder setFuelTypes(@NonNull CarValue<List<Integer>> fuelTypes)
```

Sets the cars fuel types.

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