SkinTemperatureRecord


public final class SkinTemperatureRecord implements Record


Captures the skin temperature of a user. Each record can represent a series of measurements of temperature differences.

Throws
kotlin.IllegalArgumentException

if startTime endTime or deltas are not within the record time range or baseline is not within MIN_TEMPERATURE, MAX_TEMPERATURE.

Summary

Nested types

public final class SkinTemperatureRecord.Delta

Represents a skin temperature delta entry of SkinTemperatureRecord.

Constants

static final int

Skin temperature measurement was taken from finger.

static final int

Skin temperature measurement was taken from toe.

static final int

Use this if the location is unknown.

static final int

Skin temperature measurement was taken from wrist.

Public constructors

SkinTemperatureRecord(
    @NonNull Instant startTime,
    ZoneOffset startZoneOffset,
    @NonNull Instant endTime,
    ZoneOffset endZoneOffset,
    @NonNull List<@NonNull SkinTemperatureRecord.Delta> deltas,
    Temperature baseline,
    int measurementLocation,
    @NonNull Metadata metadata
)

Public methods

boolean
equals(Object other)
final Temperature

Temperature in Temperature unit.

final @NonNull List<@NonNull SkinTemperatureRecord.Delta>

a list of skin temperature Delta.

@NonNull Instant

End time of the record.

ZoneOffset

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

final int

indicates the location on the body from which the temperature reading was taken.

@NonNull Metadata

set of common metadata associated with the written record.

@NonNull Instant

Start time of the record.

ZoneOffset

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

int
@NonNull String

Constants

MEASUREMENT_LOCATION_FINGER

public static final int MEASUREMENT_LOCATION_FINGER = 1

Skin temperature measurement was taken from finger.

MEASUREMENT_LOCATION_TOE

public static final int MEASUREMENT_LOCATION_TOE = 2

Skin temperature measurement was taken from toe.

MEASUREMENT_LOCATION_UNKNOWN

public static final int MEASUREMENT_LOCATION_UNKNOWN = 0

Use this if the location is unknown.

MEASUREMENT_LOCATION_WRIST

public static final int MEASUREMENT_LOCATION_WRIST = 3

Skin temperature measurement was taken from wrist.

Public constructors

SkinTemperatureRecord

Added in 1.1.0-alpha09
public SkinTemperatureRecord(
    @NonNull Instant startTime,
    ZoneOffset startZoneOffset,
    @NonNull Instant endTime,
    ZoneOffset endZoneOffset,
    @NonNull List<@NonNull SkinTemperatureRecord.Delta> deltas,
    Temperature baseline,
    int measurementLocation,
    @NonNull Metadata metadata
)
Parameters
@NonNull Instant startTime

Start time of the record.

ZoneOffset startZoneOffset

User experienced zone offset at startTime, 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.

@NonNull Instant endTime

End time of the record.

ZoneOffset endZoneOffset

User experienced zone offset at endTime, 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.

@NonNull List<@NonNull SkinTemperatureRecord.Delta> deltas

a list of skin temperature Delta. If baseline is set, these values are expected to be relative to it.

Temperature baseline

Temperature in Temperature unit. Optional field, null by default. Valid range: 0-100 Celsius degrees.

int measurementLocation

indicates the location on the body from which the temperature reading was taken. Optional field, MEASUREMENT_LOCATION_UNKNOWN by default. Allowed values: SkinTemperatureMeasurementLocation.

@NonNull Metadata metadata

set of common metadata associated with the written record.

Public methods

equals

public boolean equals(Object other)

getBaseline

Added in 1.1.0-alpha09
public final Temperature getBaseline()

Temperature in Temperature unit. Optional field, null by default. Valid range: 0-100 Celsius degrees.

getDeltas

Added in 1.1.0-alpha09
public final @NonNull List<@NonNull SkinTemperatureRecord.DeltagetDeltas()

a list of skin temperature Delta. If baseline is set, these values are expected to be relative to it.

getEndTime

Added in 1.1.0-alpha09
public @NonNull Instant getEndTime()

End time of the record.

getEndZoneOffset

Added in 1.1.0-alpha09
public ZoneOffset getEndZoneOffset()

User experienced zone offset at endTime, 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.

getMeasurementLocation

Added in 1.1.0-alpha09
public final int getMeasurementLocation()

indicates the location on the body from which the temperature reading was taken. Optional field, MEASUREMENT_LOCATION_UNKNOWN by default. Allowed values: SkinTemperatureMeasurementLocation.

getMetadata

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

set of common metadata associated with the written record.

getStartTime

Added in 1.1.0-alpha09
public @NonNull Instant getStartTime()

Start time of the record.

getStartZoneOffset

Added in 1.1.0-alpha09
public ZoneOffset getStartZoneOffset()

User experienced zone offset at startTime, 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()