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

*** ** * ** ***


```
public final class ExerciseCompletionGoal.DistanceGoal extends ExerciseCompletionGoal
```

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||
| ↳ | [androidx.health.connect.client.records.ExerciseCompletionGoal](https://developer.android.com/reference/androidx/health/connect/client/records/ExerciseCompletionGoal) ||
|   | ↳ | [androidx.health.connect.client.records.ExerciseCompletionGoal.DistanceGoal](https://developer.android.com/reference/androidx/health/connect/client/records/ExerciseCompletionGoal.DistanceGoal) |

*** ** * ** ***

An `https://developer.android.com/reference/androidx/health/connect/client/records/ExerciseCompletionGoal` that requires covering a specified distance.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/health/connect/client/records/ExerciseCompletionGoal.DistanceGoal#DistanceGoal(androidx.health.connect.client.units.Length)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/connect/client/units/Length distance)` |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/health/connect/client/records/ExerciseCompletionGoal.DistanceGoal#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/androidx/health/connect/client/units/Length` | `https://developer.android.com/reference/androidx/health/connect/client/records/ExerciseCompletionGoal.DistanceGoal#getDistance()()` |
| `int` | `https://developer.android.com/reference/androidx/health/connect/client/records/ExerciseCompletionGoal.DistanceGoal#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/ExerciseCompletionGoal.DistanceGoal#toString()()` |

## Public constructors

### DistanceGoal

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

```
public DistanceGoal(@NonNull Length distance)
```

## Public methods

### equals

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

### getDistance

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

```
public final @NonNull Length getDistance()
```

### hashCode

```
public int hashCode()
```

### toString

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