# IntervalDataPoint

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/IntervalDataPoint.kt+class:androidx.health.services.client.data.IntervalDataPoint) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/health#1.0.0)

*** ** * ** ***


```
class IntervalDataPoint<T : Any> : DataPoint<T>
```

<br />

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [androidx.health.services.client.data.DataPoint](https://developer.android.com/reference/kotlin/androidx/health/services/client/data/DataPoint)\<T\> ||
|   | ↳ | [androidx.health.services.client.data.IntervalDataPoint](https://developer.android.com/reference/kotlin/androidx/health/services/client/data/IntervalDataPoint) |

*** ** * ** ***

Data point that includes just the delta from the previous data point for `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/IntervalDataPoint#dataType()`.

## Summary

| ### Public constructors |
|---|
| `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html> https://developer.android.com/reference/kotlin/androidx/health/services/client/data/IntervalDataPoint#IntervalDataPoint(androidx.health.services.client.data.DataType,kotlin.Any,java.time.Duration,java.time.Duration,android.os.Bundle,androidx.health.services.client.data.DataPointAccuracy)( dataType: https://developer.android.com/reference/kotlin/androidx/health/services/client/data/DataType<T, https://developer.android.com/reference/kotlin/androidx/health/services/client/data/IntervalDataPoint<T>>, value: T, startDurationFromBoot: https://developer.android.com/reference/java/time/Duration.html, endDurationFromBoot: https://developer.android.com/reference/java/time/Duration.html, metadata: https://developer.android.com/reference/android/os/Bundle.html, accuracy: https://developer.android.com/reference/kotlin/androidx/health/services/client/data/DataPointAccuracy? )` |

| ### Public functions |
|---|---|
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/IntervalDataPoint#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `https://developer.android.com/reference/java/time/Instant.html` | `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/IntervalDataPoint#getEndInstant(java.time.Instant)(bootInstant: https://developer.android.com/reference/java/time/Instant.html)` Returns the end `https://developer.android.com/reference/java/time/Instant.html` of this `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/DataPoint`, knowing the time at which the system booted. |
| `https://developer.android.com/reference/java/time/Instant.html` | `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/IntervalDataPoint#getStartInstant(java.time.Instant)(bootInstant: https://developer.android.com/reference/java/time/Instant.html)` Returns the start `https://developer.android.com/reference/java/time/Instant.html` of this `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/DataPoint`, knowing the time at which the system booted. |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/IntervalDataPoint#hashCode()()` |

| ### Public properties |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/DataPointAccuracy?` | `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/IntervalDataPoint#accuracy()` Accuracy of this DataPoint. |
| `open https://developer.android.com/reference/kotlin/androidx/health/services/client/data/DataType<T, https://developer.android.com/reference/kotlin/androidx/health/services/client/data/IntervalDataPoint<T>>` | `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/IntervalDataPoint#dataType()` The `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/DataType` this `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/DataPoint` represents. |
| `https://developer.android.com/reference/java/time/Duration.html` | `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/IntervalDataPoint#endDurationFromBoot()` The end of the time period this `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/DataPoint` represents. |
| `https://developer.android.com/reference/android/os/Bundle.html` | `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/IntervalDataPoint#metadata()` OEM specific data. |
| `https://developer.android.com/reference/java/time/Duration.html` | `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/IntervalDataPoint#startDurationFromBoot()` The beginning of the time period this `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/DataPoint` represents. |
| `T` | `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/IntervalDataPoint#value()` The value of this data point. |

## Public constructors

### IntervalDataPoint

```
<T : Any> IntervalDataPoint(
    dataType: DataType<T, IntervalDataPoint<T>>,
    value: T,
    startDurationFromBoot: Duration,
    endDurationFromBoot: Duration,
    metadata: Bundle = Bundle(),
    accuracy: DataPointAccuracy? = null
)
```

## Public functions

### equals

```
open operator fun equals(other: Any?): Boolean
```

### getEndInstant

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

```
fun getEndInstant(bootInstant: Instant): Instant
```

Returns the end `https://developer.android.com/reference/java/time/Instant.html` of this `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/DataPoint`, knowing the time at which the system booted.

| Parameters |
|---|---|
| `bootInstant: https://developer.android.com/reference/java/time/Instant.html` | the `https://developer.android.com/reference/java/time/Instant.html` at which the system booted, this can be computed by `Instant.ofEpochMilli(System.currentTimeMillis() - SystemClock.elapsedRealtime())` |

### getStartInstant

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

```
fun getStartInstant(bootInstant: Instant): Instant
```

Returns the start `https://developer.android.com/reference/java/time/Instant.html` of this `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/DataPoint`, knowing the time at which the system booted.

| Parameters |
|---|---|
| `bootInstant: https://developer.android.com/reference/java/time/Instant.html` | the `https://developer.android.com/reference/java/time/Instant.html` at which the system booted, this can be computed by `Instant.ofEpochMilli(System.currentTimeMillis() - SystemClock.elapsedRealtime()) ` |

### hashCode

```
open fun hashCode(): Int
```

## Public properties

### accuracy

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

```
val accuracy: DataPointAccuracy?
```

Accuracy of this DataPoint.

### dataType

```
open val dataType: DataType<T, IntervalDataPoint<T>>
```

The `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/DataType` this `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/DataPoint` represents.

### endDurationFromBoot

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

```
val endDurationFromBoot: Duration
```

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

### metadata

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

```
val metadata: Bundle
```

OEM specific data. In general, this should not be relied upon by non-preloaded apps.

### startDurationFromBoot

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

```
val startDurationFromBoot: Duration
```

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

### value

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

```
val value: T
```

The value of this data point.