# EnergyProfile.Builder

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

*** ** * ** ***

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

<br />

```
class EnergyProfile.Builder
```

<br />

*** ** * ** ***

A builder of[EnergyProfile](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/info/EnergyProfile).

## Summary

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

|                                                     ### Public functions                                                     |
|------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [EnergyProfile](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/info/EnergyProfile)                 | [build](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/info/EnergyProfile.Builder#build())`()` Constructs the[EnergyProfile](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/info/EnergyProfile)defined by this builder.                                                                                                                                                                                                                                                                                                                                                                                                      |
| [EnergyProfile.Builder](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/info/EnergyProfile.Builder) | [setEvConnectorTypes](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/info/EnergyProfile.Builder#setEvConnectorTypes(androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Integer>>))`(evConnectorTypes: `[CarValue](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/common/CarValue)`<(`[Mutable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)`)`[List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html)`<`[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`!>!>)` Sets the cars EV connector types. |
| [EnergyProfile.Builder](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/info/EnergyProfile.Builder) | [setFuelTypes](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/info/EnergyProfile.Builder#setFuelTypes(androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Integer>>))`(fuelTypes: `[CarValue](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/common/CarValue)`<(`[Mutable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)`)`[List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html)`<`[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`!>!>)` Sets the cars fuel types.                              |

## Public constructors

### Builder

Added in 1.1.0  

```
Builder()
```  

## Public functions

### build

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

```
fun build(): EnergyProfile
```

Constructs the[EnergyProfile](https://developer.android.com/reference/kotlin/androidx/car/app/hardware/info/EnergyProfile)defined by this builder.

Any fields which have not been set are added with`null`value and[STATUS_UNIMPLEMENTED](https://developer.android.com/reference/kotlin/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)  

```
fun setEvConnectorTypes(evConnectorTypes: CarValue<(Mutable)List<Int!>!>): EnergyProfile.Builder
```

Sets the cars EV connector types.  

|                                                    Throws                                                     |
|---------------------------------------------------------------------------------------------------------------|------------------------------|
| [java.lang.NullPointerException](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)  

```
fun setFuelTypes(fuelTypes: CarValue<(Mutable)List<Int!>!>): EnergyProfile.Builder
```

Sets the cars fuel types.  

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