public final class

EnergyLevel.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.car.app.hardware.info.EnergyLevel.Builder

Overview

A builder of EnergyLevel.

Summary

Constructors
publicBuilder()

Methods
public EnergyLevelbuild()

Constructs the EnergyLevel defined by this builder.

public EnergyLevel.BuildersetBatteryPercent(CarValue<java.lang.Float> batteryPercent)

Sets the remaining batter percentage.

public EnergyLevel.BuildersetDistanceDisplayUnit(CarValue<java.lang.Integer> distanceDisplayUnit)

Sets the distance display unit.

public EnergyLevel.BuildersetEnergyIsLow(CarValue<java.lang.Boolean> energyIsLow)

Sets if the remaining energy is low.

public EnergyLevel.BuildersetFuelPercent(CarValue<java.lang.Float> fuelPercent)

Sets the remaining fuel percentage.

public EnergyLevel.BuildersetFuelVolumeDisplayUnit(CarValue<java.lang.Integer> fuelVolumeDisplayUnit)

Sets the fuel volume display unit.

public EnergyLevel.BuildersetRangeRemainingMeters(CarValue<java.lang.Float> rangeRemainingMeters)

Sets the range of the remaining fuel in meters.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Builder()

Methods

public EnergyLevel.Builder setBatteryPercent(CarValue<java.lang.Float> batteryPercent)

Sets the remaining batter percentage.

public EnergyLevel.Builder setFuelPercent(CarValue<java.lang.Float> fuelPercent)

Sets the remaining fuel percentage.

public EnergyLevel.Builder setEnergyIsLow(CarValue<java.lang.Boolean> energyIsLow)

Sets if the remaining energy is low.

public EnergyLevel.Builder setRangeRemainingMeters(CarValue<java.lang.Float> rangeRemainingMeters)

Sets the range of the remaining fuel in meters.

public EnergyLevel.Builder setDistanceDisplayUnit(CarValue<java.lang.Integer> distanceDisplayUnit)

Sets the distance display unit.

Valid values are in CarUnit.

public EnergyLevel.Builder setFuelVolumeDisplayUnit(CarValue<java.lang.Integer> fuelVolumeDisplayUnit)

Sets the fuel volume display unit.

public EnergyLevel build()

Constructs the EnergyLevel defined by this builder.