RestingHeartRateRecord


public final class RestingHeartRateRecord implements Record


Captures the user's resting heart rate. Each record represents a single instantaneous measurement.

Summary

Public fields

static final @NonNull AggregateMetric<@NonNull Long>

Metric identifier to retrieve the average resting heart rate from AggregationResult.

static final @NonNull AggregateMetric<@NonNull Long>

Metric identifier to retrieve the maximum resting heart rate from AggregationResult.

static final @NonNull AggregateMetric<@NonNull Long>

Metric identifier to retrieve the minimum resting heart rate from AggregationResult.

Public constructors

RestingHeartRateRecord(
    @NonNull Instant time,
    ZoneOffset zoneOffset,
    long beatsPerMinute,
    @NonNull Metadata metadata
)

Public methods

boolean
equals(Object other)
final long

Heart beats per minute.

@NonNull Metadata

Set of common metadata associated with the written record.

@NonNull Instant

Time the record happened.

ZoneOffset

User experienced zone offset at time, or null if unknown.

int
@NonNull String

Public fields

BPM_AVG

public static final @NonNull AggregateMetric<@NonNull LongBPM_AVG

Metric identifier to retrieve the average resting heart rate from AggregationResult.

BPM_MAX

public static final @NonNull AggregateMetric<@NonNull LongBPM_MAX

Metric identifier to retrieve the maximum resting heart rate from AggregationResult.

BPM_MIN

public static final @NonNull AggregateMetric<@NonNull LongBPM_MIN

Metric identifier to retrieve the minimum resting heart rate from AggregationResult.

Public constructors

RestingHeartRateRecord

Added in 1.1.0-alpha10
public RestingHeartRateRecord(
    @NonNull Instant time,
    ZoneOffset zoneOffset,
    long beatsPerMinute,
    @NonNull Metadata metadata
)

Public methods

equals

public boolean equals(Object other)

getBeatsPerMinute

Added in 1.1.0-alpha10
public final long getBeatsPerMinute()

Heart beats per minute. Required field. Validation range: 1-300.

getMetadata

Added in 1.1.0-alpha10
public @NonNull Metadata getMetadata()

Set of common metadata associated with the written record.

getTime

Added in 1.1.0-alpha10
public @NonNull Instant getTime()

Time the record happened.

getZoneOffset

Added in 1.1.0-alpha10
public ZoneOffset getZoneOffset()

User experienced zone offset at time, or null if unknown. Providing these will help history aggregations results stay consistent should user travel. Queries with user experienced time filters will assume system current zone offset if the information is absent.

hashCode

public int hashCode()

toString

public @NonNull String toString()