Added in API level 34

PowerRecordSample

class PowerRecordSample
kotlin.Any
   ↳ android.health.connect.datatypes.PowerRecord.PowerRecordSample

Represents a single measurement of power. For example, using a power meter when exercising on a stationary bike.

Summary

Public constructors

PowerRecord sample for entries of PowerRecord

Public methods
Boolean
equals(other: Any?)

Indicates whether some other object is "equal to" this one.

Power

Instant

Int

Returns a hash code value for the object.

Public constructors

PowerRecordSample

Added in API level 34
PowerRecordSample(
    power: Power,
    time: Instant)

PowerRecord sample for entries of PowerRecord

Parameters
power Power: Power generated, in Power unit. This value cannot be null.
time Instant: The point in time when the measurement was taken. This value cannot be null.

Public methods

equals

Added in API level 34
fun equals(other: Any?): Boolean

Indicates whether some other object is "equal to" this one.

Parameters
obj the reference object with which to compare.
object the reference object with which to compare.
Return
Boolean true if this object is the same as the obj

getPower

Added in API level 34
fun getPower(): Power
Return
Power Power for this sample This value cannot be null.

getTime

Added in API level 34
fun getTime(): Instant
Return
Instant time at which this sample was recorded This value cannot be null.

hashCode

Added in API level 34
fun hashCode(): Int

Returns a hash code value for the object.

Return
Int a hash code value for this object.