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, sum
public float batteryLevelPct
public long batteryRealtimeMs
public long chargingRealtimeMs
public DeviceBatteryMetrics set(DeviceBatteryMetrics metrics)
SystemMetrics
set
in class SystemMetrics<DeviceBatteryMetrics>
public DeviceBatteryMetrics sum(@Nullable DeviceBatteryMetrics b, @Nullable DeviceBatteryMetrics output)
SystemMetrics
sum
in class SystemMetrics<DeviceBatteryMetrics>
public DeviceBatteryMetrics diff(@Nullable DeviceBatteryMetrics b, @Nullable DeviceBatteryMetrics output)
SystemMetrics
diff
in class SystemMetrics<DeviceBatteryMetrics>
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object