Added in API level 34
SpeedRecordSample
class SpeedRecordSample
| kotlin.Any | |
| ↳ | android.health.connect.datatypes.SpeedRecord.SpeedRecordSample |
Represents a single measurement of the speed, a scalar magnitude.
Summary
| Public constructors | |
|---|---|
SpeedRecordSample(speed: Velocity, time: Instant)SpeedRecord sample for entries of |
|
| Public methods | |
|---|---|
| Boolean |
Indicates whether some other object is "equal to" this one. |
| Velocity |
getSpeed() |
| Instant |
getTime() |
| Int |
hashCode()Returns a hash code value for the object. |
Public constructors
SpeedRecordSample
Added in API level 34
SpeedRecordSample(
speed: Velocity,
time: Instant)
SpeedRecord sample for entries of SpeedRecord
| Parameters | |
|---|---|
speed |
Velocity: Speed in Velocity 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. This value may be null. |
| Return | |
|---|---|
Boolean |
true if this object is the same as the obj |
getSpeed
Added in API level 34
fun getSpeed(): Velocity
| Return | |
|---|---|
Velocity |
Speed 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. |