# ExerciseCompletionGoal.DistanceGoal

# ExerciseCompletionGoal.DistanceGoal

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/ExerciseCompletionGoal.kt+class:androidx.health.connect.client.records.ExerciseCompletionGoal.DistanceGoal)  
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/ExerciseCompletionGoal.DistanceGoal "View this page in Java")

<br />

```
class ExerciseCompletionGoal.DistanceGoal : ExerciseCompletionGoal
```

<br />

|---|---|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)                                                                                                                            |||
| ↳ | [androidx.health.connect.client.records.ExerciseCompletionGoal](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseCompletionGoal)                              ||
|   | ↳ | [androidx.health.connect.client.records.ExerciseCompletionGoal.DistanceGoal](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseCompletionGoal.DistanceGoal) |

*** ** * ** ***

An[ExerciseCompletionGoal](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseCompletionGoal)that requires covering a specified distance.

## Summary

|                                                                                                                                                 ### Public constructors                                                                                                                                                 |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [DistanceGoal](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseCompletionGoal.DistanceGoal#DistanceGoal(androidx.health.connect.client.units.Length))`(distance: `[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/ExerciseCompletionGoal.DistanceGoal#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/ExerciseCompletionGoal.DistanceGoal#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/ExerciseCompletionGoal.DistanceGoal#toString())`()`                                                                                            |

|                                        ### Public properties                                         |
|------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------|
| [Length](https://developer.android.com/reference/kotlin/androidx/health/connect/client/units/Length) | [distance](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseCompletionGoal.DistanceGoal#distance()) |

## Public constructors

### DistanceGoal

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

```
DistanceGoal(distance: Length)
```  

## Public functions

### equals

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

### hashCode

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

### toString

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

## Public properties

### distance

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

```
val distance: Length
```