# ExerciseLap

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

*** ** * ** ***


```
public final class ExerciseLap
```

<br />

*** ** * ** ***

Captures the time of a lap within an exercise session.

Each lap contains the start and end time and optional \[Length\] of the lap (e.g. pool length
while swimming or a track lap while running). There may or may not be direct correlation with
\[ExerciseSegment\] start and end times, e.g. \[ExerciseSessionRecord\] of type running without any
segments can be divided into laps of different lengths.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/health/connect/client/records/ExerciseSessionRecord` |   |

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/health/connect/client/records/ExerciseLap#ExerciseLap(java.time.Instant,java.time.Instant,androidx.health.connect.client.units.Length)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/time/Instant.html startTime, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/time/Instant.html endTime, https://developer.android.com/reference/androidx/health/connect/client/units/Length length )` |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/health/connect/client/records/ExerciseLap#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` |
| `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/connect/client/records/ExerciseLap#getEndTime()()` |
| `final https://developer.android.com/reference/androidx/health/connect/client/units/Length` | `https://developer.android.com/reference/androidx/health/connect/client/records/ExerciseLap#getLength()()` Lap length in `https://developer.android.com/reference/androidx/health/connect/client/units/Length` unit. |
| `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/connect/client/records/ExerciseLap#getStartTime()()` |
| `int` | `https://developer.android.com/reference/androidx/health/connect/client/records/ExerciseLap#hashCode()()` |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/health/connect/client/records/ExerciseLap#toString()()` |

## Public constructors

### ExerciseLap

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

```
public ExerciseLap(
    @NonNull Instant startTime,
    @NonNull Instant endTime,
    Length length
)
```

## Public methods

### equals

```
public boolean equals(Object other)
```

### getEndTime

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

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

### getLength

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

```
public final Length getLength()
```

Lap length in `https://developer.android.com/reference/androidx/health/connect/client/units/Length` unit. Optional field. Valid range: 0-1000000 meters.

### getStartTime

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

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

### hashCode

```
public int hashCode()
```

### toString

```
public @NonNull String toString()
```