Added in API level 34
SpeedRecord.SpeedRecordSample
public
static
final
class
SpeedRecord.SpeedRecordSample
extends Object
| java.lang.Object | |
| ↳ | android.health.connect.datatypes.SpeedRecord.SpeedRecordSample |
Represents a single measurement of the speed, a scalar magnitude.
Summary
Public constructors | |
|---|---|
SpeedRecordSample(Velocity speed, Instant time)
SpeedRecord sample for entries of |
|
Public methods | |
|---|---|
boolean
|
equals(Object object)
Indicates whether some other object is "equal to" this one. |
Velocity
|
getSpeed()
|
Instant
|
getTime()
|
int
|
hashCode()
Returns a hash code value for the object. |
Inherited methods | |
|---|---|
Public constructors
SpeedRecordSample
Added in API level 34
public SpeedRecordSample (Velocity speed, Instant time)
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
public boolean equals (Object object)
Indicates whether some other object is "equal to" this one.
| Parameters | |
|---|---|
object |
Object: the reference object with which to compare.
This value may be null. |
| Returns | |
|---|---|
boolean |
true if this object is the same as the obj |
getSpeed
Added in API level 34
public Velocity getSpeed ()
| Returns | |
|---|---|
Velocity |
Speed for this sample
This value cannot be null. |
getTime
Added in API level 34
public Instant getTime ()
| Returns | |
|---|---|
Instant |
time at which this sample was recorded
This value cannot be null. |
hashCode
Added in API level 34
public int hashCode ()
Returns a hash code value for the object.
| Returns | |
|---|---|
int |
a hash code value for this object. |