# ExerciseLap

# 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)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/health/connect/client/records/ExerciseLap "View this page in Java")

<br />

```
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                                                               |
|--------------------------------------------------------------------------------------------------------------------------------------|---|
| [ExerciseSessionRecord](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord) |   |

## Summary

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

|                                        ### Public functions                                         |
|-----------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `open operator `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | [equals](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseLap#equals(kotlin.Any))`(other: `[Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)`?)` |
| `open `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                  | [hashCode](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseLap#hashCode())`()`                                                                                            |
| `open `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)            | [toString](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseLap#toString())`()`                                                                                            |

|                                          ### Public properties                                          |
|---------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Instant](https://developer.android.com/reference/java/time/Instant.html)                               | [endTime](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseLap#endTime())                                                                                                                      |
| [Length](https://developer.android.com/reference/kotlin/androidx/health/connect/client/units/Length)`?` | [length](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseLap#length()) Lap length in[Length](https://developer.android.com/reference/kotlin/androidx/health/connect/client/units/Length)unit. |
| [Instant](https://developer.android.com/reference/java/time/Instant.html)                               | [startTime](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseLap#startTime())                                                                                                                  |

## Public constructors

### ExerciseLap

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

```
ExerciseLap(startTime: Instant, endTime: Instant, length: Length? = null)
```  

## Public functions

### equals

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

### hashCode

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

### toString

```
open fun toString(): String
```  

## Public properties

### endTime

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

```
val endTime: Instant
```  

### length

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

```
val length: Length?
```

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

### startTime

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

```
val startTime: Instant
```