public class DeviceBatteryMetrics extends SystemMetrics<DeviceBatteryMetrics>
| Modifier and Type | Field and Description |
|---|---|
float |
batteryLevelPct |
long |
batteryRealtimeMs |
long |
chargingRealtimeMs |
| Constructor and Description |
|---|
DeviceBatteryMetrics() |
| Modifier and Type | Method and Description |
|---|---|
DeviceBatteryMetrics |
diff(DeviceBatteryMetrics b,
DeviceBatteryMetrics output)
Subtract the object passed in from the current object.
|
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
DeviceBatteryMetrics |
set(DeviceBatteryMetrics metrics)
Sets all fields in this to values from the SystemMetrics object passed in: a _deep_ copy that
shouldn't share any values with other metrics objects.
|
DeviceBatteryMetrics |
sum(DeviceBatteryMetrics b,
DeviceBatteryMetrics output)
Add values from the SystemMetrics object passed in and sets them on the output object,
if available.
|
java.lang.String |
toString() |
diff, sumpublic float batteryLevelPct
public long batteryRealtimeMs
public long chargingRealtimeMs
public DeviceBatteryMetrics set(DeviceBatteryMetrics metrics)
SystemMetricsset in class SystemMetrics<DeviceBatteryMetrics>public DeviceBatteryMetrics sum(@Nullable DeviceBatteryMetrics b, @Nullable DeviceBatteryMetrics output)
SystemMetricssum in class SystemMetrics<DeviceBatteryMetrics>public DeviceBatteryMetrics diff(@Nullable DeviceBatteryMetrics b, @Nullable DeviceBatteryMetrics output)
SystemMetricsdiff in class SystemMetrics<DeviceBatteryMetrics>public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object