StatisticalDataPoint


public final class StatisticalDataPoint<T extends Number> extends DataPoint


Data point that represents statistics on SampleDataPoints between start and end, though it is not required to request samples separately.

Summary

Public constructors

<T extends Number> StatisticalDataPoint(
    @NonNull AggregateDataType<@NonNull T, @NonNull StatisticalDataPoint<@NonNull T>> dataType,
    @NonNull T min,
    @NonNull T max,
    @NonNull T average,
    @NonNull Instant start,
    @NonNull Instant end
)

Public methods

final @NonNull T

The average observed value between start and end.

final @NonNull Instant

The end time this point covers.

final @NonNull T

The maximum observed value between start and end.

final @NonNull T

The minimum observed value between start and end.

final @NonNull Instant

The beginning of time this point covers.

Inherited methods

From androidx.health.services.client.data.DataPoint
@NonNull DataType<@NonNull T, @NonNull DataPoint<@NonNull T>>

Type of data contained within this DataPoint.

Public constructors

StatisticalDataPoint

public <T extends Number> StatisticalDataPoint(
    @NonNull AggregateDataType<@NonNull T, @NonNull StatisticalDataPoint<@NonNull T>> dataType,
    @NonNull T min,
    @NonNull T max,
    @NonNull T average,
    @NonNull Instant start,
    @NonNull Instant end
)

Public methods

getAverage

Added in 1.0.0
public final @NonNullgetAverage()

The average observed value between start and end.

getEnd

Added in 1.0.0
public final @NonNull Instant getEnd()

The end time this point covers.

getMax

Added in 1.0.0
public final @NonNullgetMax()

The maximum observed value between start and end.

getMin

Added in 1.0.0
public final @NonNullgetMin()

The minimum observed value between start and end.

getStart

Added in 1.0.0
public final @NonNull Instant getStart()

The beginning of time this point covers.