Stay organized with collections
Save and categorize content based on your preferences.
Builder
class Builder
Builder class for ExerciseLap
Summary
Public constructors
Builder
Builder(
startTime: Instant,
endTime: Instant)
Parameters |
startTime |
Instant: This value cannot be null . |
endTime |
Instant: This value cannot be null . |
Public methods
setLength
fun setLength(length: Length): ExerciseLap.Builder
Sets the length of this lap
Parameters |
length |
Length: Length of the lap, in Length unit. Optional field. Valid range: 0-1000000 meters. This value cannot be null . |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# ExerciseLap.Builder\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nBuilder\n=======\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/health/connect/datatypes/ExerciseLap.Builder \"View this page in Java\") \n\n```\nclass Builder\n```\n\n|---|-----------------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.health.connect.datatypes.ExerciseLap.Builder](#) |\n\nBuilder class for [ExerciseLap](/reference/kotlin/android/health/connect/datatypes/ExerciseLap)\n\nSummary\n-------\n\n| Public constructors ||\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [Builder](#Builder(java.time.Instant,%20java.time.Instant))`(`startTime:` `[Instant](../../../../java/time/Instant.html#)`, `endTime:` `[Instant](../../../../java/time/Instant.html#)`)` \u003cbr /\u003e |\n\n| Public methods ||\n|-------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [ExerciseLap](/reference/kotlin/android/health/connect/datatypes/ExerciseLap) | [build](#build())`()` Builds [ExerciseLap](/reference/kotlin/android/health/connect/datatypes/ExerciseLap) instance. |\n| [ExerciseLap.Builder](#) | [setLength](#setLength(android.health.connect.datatypes.units.Length))`(`length:` `[Length](/reference/kotlin/android/health/connect/datatypes/units/Length)`)` Sets the length of this lap |\n\nPublic constructors\n-------------------\n\n### Builder\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nBuilder(\n startTime: Instant, \n endTime: Instant)\n```\n\n| Parameters ||\n|-------------|------------------------------------------------------------------------------|\n| `startTime` | [Instant](../../../../java/time/Instant.html#): This value cannot be `null`. |\n| `endTime` | [Instant](../../../../java/time/Instant.html#): This value cannot be `null`. |\n\nPublic methods\n--------------\n\n### build\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun build(): ExerciseLap\n```\n\nBuilds [ExerciseLap](/reference/kotlin/android/health/connect/datatypes/ExerciseLap) instance.\n\n| Return ||\n|-------------------------------------------------------------------------------|------------------------------|\n| [ExerciseLap](/reference/kotlin/android/health/connect/datatypes/ExerciseLap) | This value cannot be `null`. |\n\n### setLength\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun setLength(length: Length): ExerciseLap.Builder\n```\n\nSets the length of this lap\n\n| Parameters ||\n|----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `length` | [Length](/reference/kotlin/android/health/connect/datatypes/units/Length): Length of the lap, in [Length](/reference/kotlin/android/health/connect/datatypes/units/Length) unit. Optional field. Valid range: 0-1000000 meters. This value cannot be `null`. |\n\n| Return ||\n|--------------------------|------------------------------|\n| [ExerciseLap.Builder](#) | This value cannot be `null`. |"]]