EnergyLevel
@CarProtocol
@RequiresCarApi(value = 3)
public final class EnergyLevel
Information of the energy (fuel and battery) levels from the car hardware.
Summary
Nested types |
|---|
public final class EnergyLevel.BuilderA builder of |
Public methods |
|
|---|---|
boolean |
|
@NonNull CarValue<Float> |
Returns the battery percentage remaining from the car hardware. |
@NonNull CarValue<Integer> |
Returns the distance display unit from the car hardware. |
@NonNull CarValue<Boolean> |
Returns if the remaining car energy is low from the car hardware. |
@NonNull CarValue<Float> |
Returns the fuel percentage remaining from the car hardware. |
@NonNull CarValue<Integer> |
Returns the fuel volume display unit from the car hardware. |
@NonNull CarValue<Float> |
Returns the range remaining from the car hardware in meters. |
int |
hashCode() |
@NonNull String |
toString() |
Public methods
getBatteryPercent
public @NonNull CarValue<Float> getBatteryPercent()
Returns the battery percentage remaining from the car hardware.
getDistanceDisplayUnit
public @NonNull CarValue<Integer> getDistanceDisplayUnit()
Returns the distance display unit from the car hardware.
See CarUnit for possible distance values.
getEnergyIsLow
public @NonNull CarValue<Boolean> getEnergyIsLow()
Returns if the remaining car energy is low from the car hardware.
getFuelPercent
public @NonNull CarValue<Float> getFuelPercent()
Returns the fuel percentage remaining from the car hardware.
getFuelVolumeDisplayUnit
@ExperimentalCarApi
public @NonNull CarValue<Integer> getFuelVolumeDisplayUnit()
Returns the fuel volume display unit from the car hardware.
See CarUnit for possible volume values.
getRangeRemainingMeters
public @NonNull CarValue<Float> getRangeRemainingMeters()
Returns the range remaining from the car hardware in meters.