SampleDataPoint
public final class SampleDataPoint<T extends Object> extends DataPoint
| java.lang.Object | ||
| ↳ | androidx.health.services.client.data.DataPoint | |
| ↳ | androidx.health.services.client.data.SampleDataPoint |
Data point that represents a piece of data that was valid at a single point in time, for example heart rate or speed.
Summary
Public constructors |
|---|
<T extends Object> SampleDataPoint( |
Public methods |
|
|---|---|
boolean |
|
final DataPointAccuracy |
Accuracy of this DataPoint. |
@NonNull DataType<@NonNull T, @NonNull SampleDataPoint<@NonNull T>> |
|
final @NonNull Bundle |
OEM specific data. |
final @NonNull Duration |
The time this |
final @NonNull Instant |
getTimeInstant(@NonNull Instant bootInstant)Returns the time |
final @NonNull T |
getValue()The value of this data point. |
int |
hashCode() |
Public constructors
SampleDataPoint
public <T extends Object> SampleDataPoint(
@NonNull DataType<@NonNull T, @NonNull SampleDataPoint<@NonNull T>> dataType,
@NonNull T value,
@NonNull Duration timeDurationFromBoot,
@NonNull Bundle metadata,
DataPointAccuracy accuracy
)
Public methods
getDataType
Added in 1.1.0-alpha05
public @NonNull DataType<@NonNull T, @NonNull SampleDataPoint<@NonNull T>> getDataType()
getMetadata
Added in 1.0.0
public final @NonNull Bundle getMetadata()
OEM specific data. In general, this should not be relied upon by non-preloaded apps.
getTimeDurationFromBoot
Added in 1.0.0
public final @NonNull Duration getTimeDurationFromBoot()
The time this DataPoint represents.