CumulativeDataPoint


class CumulativeDataPoint<T : Number> : DataPoint


A DataPoint containing a cumulative total for the type dataType between start and end. Unlike IntervalDataPoint, this is guaranteed to increase over time (assuming the same start value.) For example, an IntervalDataPoint for DataType.STEPS

Summary

Public constructors

<T : Number> CumulativeDataPoint(
    dataType: AggregateDataType<T, CumulativeDataPoint<T>>,
    total: T,
    start: Instant,
    end: Instant
)

Public properties

Instant

The end of the time period this DataPoint represents.

Instant

The beginning of the time period this DataPoint represents.

T

The accumulated value between start and end.

Inherited properties

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

Type of data contained within this DataPoint.

Public constructors

CumulativeDataPoint

<T : Number> CumulativeDataPoint(
    dataType: AggregateDataType<T, CumulativeDataPoint<T>>,
    total: T,
    start: Instant,
    end: Instant
)

Public properties

end

Added in 1.0.0
val endInstant

The end of the time period this DataPoint represents.

start

Added in 1.0.0
val startInstant

The beginning of the time period this DataPoint represents.

total

Added in 1.0.0
val total: T

The accumulated value between start and end.