# ExerciseCompletionGoal.DurationGoal

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.DurationGoal) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/health-connect#1.1.0)

*** ** * ** ***


```
public final class ExerciseCompletionGoal.DurationGoal 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.DurationGoal](https://developer.android.com/reference/androidx/health/connect/client/records/ExerciseCompletionGoal.DurationGoal) |

*** ** * ** ***

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

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/health/connect/client/records/ExerciseCompletionGoal.DurationGoal#DurationGoal(java.time.Duration)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/time/Duration.html duration)` |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/health/connect/client/records/ExerciseCompletionGoal.DurationGoal#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/Duration.html` | `https://developer.android.com/reference/androidx/health/connect/client/records/ExerciseCompletionGoal.DurationGoal#getDuration()()` |
| `int` | `https://developer.android.com/reference/androidx/health/connect/client/records/ExerciseCompletionGoal.DurationGoal#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.DurationGoal#toString()()` |

## Public constructors

### DurationGoal

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

```
public DurationGoal(@NonNull Duration duration)
```

## Public methods

### equals

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

### getDuration

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

```
public final @NonNull Duration getDuration()
```

### hashCode

```
public int hashCode()
```

### toString

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