EnergyLevel

public final class EnergyLevel
extends Object

java.lang.Object
   ↳ androidx.car.app.hardware.info.EnergyLevel


Information of the energy (fuel and battery) levels from the car hardware.

Summary

Nested classes

class EnergyLevel.Builder

A builder of EnergyLevel

Public methods

boolean equals(Object other)
CarValue<Float> getBatteryPercent()

Returns the battery percentage remaining from the car hardware.

CarValue<Integer> getDistanceDisplayUnit()

Returns the distance display unit from the car hardware.

CarValue<Boolean> getEnergyIsLow()

Returns if the remaining car energy is low from the car hardware.

CarValue<Float> getFuelPercent()

Returns the fuel percentage remaining from the car hardware.

CarValue<Float> getRangeRemainingMeters()

Returns the range remaining from the car hardware in meters.

int hashCode()
String toString()

Inherited methods

Public methods

equals

public boolean equals (Object other)

Parameters
other Object

Returns
boolean

getBatteryPercent

public CarValue<Float> getBatteryPercent ()

Returns the battery percentage remaining from the car hardware.

Returns
CarValue<Float>

getDistanceDisplayUnit

public CarValue<Integer> getDistanceDisplayUnit ()

Returns the distance display unit from the car hardware.

See CarUnit for possible distance values.

Returns
CarValue<Integer>

getEnergyIsLow

public CarValue<Boolean> getEnergyIsLow ()

Returns if the remaining car energy is low from the car hardware.

Returns
CarValue<Boolean>

getFuelPercent

public CarValue<Float> getFuelPercent ()

Returns the fuel percentage remaining from the car hardware.

Returns
CarValue<Float>

getRangeRemainingMeters

public CarValue<Float> getRangeRemainingMeters ()

Returns the range remaining from the car hardware in meters.

Returns
CarValue<Float>

hashCode

public int hashCode ()

Returns
int

toString

public String toString ()

Returns
String