# CumulativeDataPoint

Artifact: [androidx.health:health-services-client](https://developer.android.com/jetpack/androidx/releases/health) [View Source](https://cs.android.com/search?q=file:androidx/health/services/client/data/CumulativeDataPoint.kt+class:androidx.health.services.client.data.CumulativeDataPoint) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/health#1.0.0)

*** ** * ** ***


```
public final class CumulativeDataPoint<T extends Number> extends DataPoint<@NonNull T>
```

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||
| ↳ | [androidx.health.services.client.data.DataPoint](https://developer.android.com/reference/androidx/health/services/client/data/DataPoint)\<@[NonNull](https://developer.android.com/reference/androidx/annotation/NonNull) T\> ||
|   | ↳ | [androidx.health.services.client.data.CumulativeDataPoint](https://developer.android.com/reference/androidx/health/services/client/data/CumulativeDataPoint) |

*** ** * ** ***

A `https://developer.android.com/reference/androidx/health/services/client/data/DataPoint` containing a cumulative `https://developer.android.com/reference/androidx/health/services/client/data/CumulativeDataPoint#total()` for the type `https://developer.android.com/reference/androidx/health/services/client/data/CumulativeDataPoint#(androidx.health.services.client.data.AggregateDataType,kotlin.Number,java.time.Instant,java.time.Instant)` between `https://developer.android.com/reference/androidx/health/services/client/data/CumulativeDataPoint#start()` and `https://developer.android.com/reference/androidx/health/services/client/data/CumulativeDataPoint#end()`. Unlike `https://developer.android.com/reference/androidx/health/services/client/data/IntervalDataPoint`, this is guaranteed to increase over time (assuming the same `https://developer.android.com/reference/androidx/health/services/client/data/CumulativeDataPoint#start()` value.) For example, an `https://developer.android.com/reference/androidx/health/services/client/data/IntervalDataPoint` for `https://developer.android.com/reference/androidx/health/services/client/data/DataType#STEPS()`

## Summary

| ### Public constructors |
|---|
| `<T extends https://developer.android.com/reference/java/lang/Number.html> https://developer.android.com/reference/androidx/health/services/client/data/CumulativeDataPoint#CumulativeDataPoint(androidx.health.services.client.data.AggregateDataType,kotlin.Number,java.time.Instant,java.time.Instant)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/services/client/data/AggregateDataType<@https://developer.android.com/reference/androidx/annotation/NonNull T, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/services/client/data/CumulativeDataPoint<@https://developer.android.com/reference/androidx/annotation/NonNull T>> dataType, @https://developer.android.com/reference/androidx/annotation/NonNull T total, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/time/Instant.html start, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/time/Instant.html end )` |

| ### Public methods |
|---|---|
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/time/Instant.html` | `https://developer.android.com/reference/androidx/health/services/client/data/CumulativeDataPoint#getEnd()()` The end of the time period this `https://developer.android.com/reference/androidx/health/services/client/data/DataPoint` represents. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/time/Instant.html` | `https://developer.android.com/reference/androidx/health/services/client/data/CumulativeDataPoint#getStart()()` The beginning of the time period this `https://developer.android.com/reference/androidx/health/services/client/data/DataPoint` represents. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull T` | `https://developer.android.com/reference/androidx/health/services/client/data/CumulativeDataPoint#getTotal()()` The accumulated value between `https://developer.android.com/reference/androidx/health/services/client/data/CumulativeDataPoint#(androidx.health.services.client.data.AggregateDataType,kotlin.Number,java.time.Instant,java.time.Instant)` and `https://developer.android.com/reference/androidx/health/services/client/data/CumulativeDataPoint#(androidx.health.services.client.data.AggregateDataType,kotlin.Number,java.time.Instant,java.time.Instant)`. |

### Inherited methods

From [androidx.health.services.client.data.DataPoint](https://developer.android.com/reference/androidx/health/services/client/data/DataPoint) `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/services/client/data/DataType<@https://developer.android.com/reference/androidx/annotation/NonNull T, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/services/client/data/DataPoint<@https://developer.android.com/reference/androidx/annotation/NonNull T>>` `https://developer.android.com/reference/androidx/health/services/client/data/DataPoint#getDataType()()`

A `https://developer.android.com/reference/androidx/health/services/client/data/DataPoint` containing a cumulative `https://developer.android.com/reference/androidx/health/services/client/data/CumulativeDataPoint#total()` for the type `https://developer.android.com/reference/androidx/health/services/client/data/CumulativeDataPoint#(androidx.health.services.client.data.AggregateDataType,kotlin.Number,java.time.Instant,java.time.Instant)` between `https://developer.android.com/reference/androidx/health/services/client/data/CumulativeDataPoint#start()` and `https://developer.android.com/reference/androidx/health/services/client/data/CumulativeDataPoint#end()`.

## Public constructors

### CumulativeDataPoint

```
public <T extends Number> CumulativeDataPoint(
    @NonNull AggregateDataType<@NonNull T, @NonNull CumulativeDataPoint<@NonNull T>> dataType,
    @NonNull T total,
    @NonNull Instant start,
    @NonNull Instant end
)
```

## Public methods

### getEnd

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/health#1.0.0)

```
public final @NonNull Instant getEnd()
```

The end of the time period this `https://developer.android.com/reference/androidx/health/services/client/data/DataPoint` represents.

### getStart

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/health#1.0.0)

```
public final @NonNull Instant getStart()
```

The beginning of the time period this `https://developer.android.com/reference/androidx/health/services/client/data/DataPoint` represents.

### getTotal

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/health#1.0.0)

```
public final @NonNull T getTotal()
```

The accumulated value between `https://developer.android.com/reference/androidx/health/services/client/data/CumulativeDataPoint#(androidx.health.services.client.data.AggregateDataType,kotlin.Number,java.time.Instant,java.time.Instant)` and `https://developer.android.com/reference/androidx/health/services/client/data/CumulativeDataPoint#(androidx.health.services.client.data.AggregateDataType,kotlin.Number,java.time.Instant,java.time.Instant)`.