EnergyLevel.Builder


class EnergyLevel.Builder


A builder of EnergyLevel.

Summary

Public constructors

Public functions

EnergyLevel

Constructs the EnergyLevel defined by this builder.

EnergyLevel.Builder
setBatteryPercent(batteryPercent: CarValue<Float!>)

Sets the remaining batter percentage.

EnergyLevel.Builder
setDistanceDisplayUnit(distanceDisplayUnit: CarValue<Int!>)

Sets the distance display unit.

EnergyLevel.Builder

Sets if the remaining energy is low.

EnergyLevel.Builder
setFuelPercent(fuelPercent: CarValue<Float!>)

Sets the remaining fuel percentage.

EnergyLevel.Builder

Sets the fuel volume display unit.

EnergyLevel.Builder
setRangeRemainingMeters(rangeRemainingMeters: CarValue<Float!>)

Sets the range of the remaining fuel in meters.

Public constructors

Builder

Added in 1.1.0
Builder()

Public functions

build

Added in 1.1.0
fun build(): EnergyLevel

Constructs the EnergyLevel defined by this builder.

setBatteryPercent

Added in 1.1.0
fun setBatteryPercent(batteryPercent: CarValue<Float!>): EnergyLevel.Builder

Sets the remaining batter percentage.

setDistanceDisplayUnit

Added in 1.1.0
fun setDistanceDisplayUnit(distanceDisplayUnit: CarValue<Int!>): EnergyLevel.Builder

Sets the distance display unit.

Valid values are in CarUnit.

Throws
java.lang.NullPointerException

if distanceDisplayUnit is null

setEnergyIsLow

Added in 1.1.0
fun setEnergyIsLow(energyIsLow: CarValue<Boolean!>): EnergyLevel.Builder

Sets if the remaining energy is low.

Throws
java.lang.NullPointerException

if energyIsLow is null

setFuelPercent

Added in 1.1.0
fun setFuelPercent(fuelPercent: CarValue<Float!>): EnergyLevel.Builder

Sets the remaining fuel percentage.

Throws
java.lang.NullPointerException

if fuelPercent is null

setFuelVolumeDisplayUnit

Added in 1.1.0
@ExperimentalCarApi
fun setFuelVolumeDisplayUnit(fuelVolumeDisplayUnit: CarValue<Int!>): EnergyLevel.Builder

Sets the fuel volume display unit.

Throws
java.lang.NullPointerException

if fuelVolumeDisplayUnit is null

setRangeRemainingMeters

Added in 1.1.0
fun setRangeRemainingMeters(rangeRemainingMeters: CarValue<Float!>): EnergyLevel.Builder

Sets the range of the remaining fuel in meters.

Throws
java.lang.NullPointerException

if rangeRemaining is null