Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [U Extensions 13](https://developer.android.com/sdkExtensions) Summary: [Ctors](https://developer.android.com/reference/android/health/connect/datatypes/PlannedExerciseBlock.Builder#pubctors) \| [Methods](https://developer.android.com/reference/android/health/connect/datatypes/PlannedExerciseBlock.Builder#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/health/connect/datatypes/PlannedExerciseBlock.Builder#inhmethods)

# PlannedExerciseBlock.Builder

*** ** * ** ***


`
public
static
final

class
PlannedExerciseBlock.Builder
`


`

extends https://developer.android.com/reference/java/lang/Object


`

`


`

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.health.connect.datatypes.PlannedExerciseBlock.Builder |

<br />

*** ** * ** ***

Builder of `https://developer.android.com/reference/android/health/connect/datatypes/PlannedExerciseBlock`.

## Summary

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/health/connect/datatypes/PlannedExerciseBlock.Builder#Builder(int)(int repetitions) ` |

| ### Public methods ||
|---|---|
| ` https://developer.android.com/reference/android/health/connect/datatypes/PlannedExerciseBlock.Builder` | ` https://developer.android.com/reference/android/health/connect/datatypes/PlannedExerciseBlock.Builder#addStep(android.health.connect.datatypes.PlannedExerciseStep)(https://developer.android.com/reference/android/health/connect/datatypes/PlannedExerciseStep step) ` Adds a `https://developer.android.com/reference/android/health/connect/datatypes/PlannedExerciseStep`. |
| ` https://developer.android.com/reference/android/health/connect/datatypes/PlannedExerciseBlock` | ` https://developer.android.com/reference/android/health/connect/datatypes/PlannedExerciseBlock.Builder#build()() ` |
| ` https://developer.android.com/reference/android/health/connect/datatypes/PlannedExerciseBlock.Builder` | ` https://developer.android.com/reference/android/health/connect/datatypes/PlannedExerciseBlock.Builder#clearSteps()() ` Clears the `https://developer.android.com/reference/android/health/connect/datatypes/PlannedExerciseStep` entries. |
| ` https://developer.android.com/reference/android/health/connect/datatypes/PlannedExerciseBlock.Builder` | ` https://developer.android.com/reference/android/health/connect/datatypes/PlannedExerciseBlock.Builder#setDescription(java.lang.CharSequence)(https://developer.android.com/reference/java/lang/CharSequence description) ` Sets the description. |
| ` https://developer.android.com/reference/android/health/connect/datatypes/PlannedExerciseBlock.Builder` | ` https://developer.android.com/reference/android/health/connect/datatypes/PlannedExerciseBlock.Builder#setRepetitions(int)(int repetitions) ` Sets the number of repetitions. |
| ` https://developer.android.com/reference/android/health/connect/datatypes/PlannedExerciseBlock.Builder` | ` https://developer.android.com/reference/android/health/connect/datatypes/PlannedExerciseBlock.Builder#setSteps(java.util.List<android.health.connect.datatypes.PlannedExerciseStep>)(https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/health/connect/datatypes/PlannedExerciseStep> steps) ` Sets the `https://developer.android.com/reference/android/health/connect/datatypes/PlannedExerciseStep` entries. |

| ### Inherited methods |
|---|---|
| From class ` https://developer.android.com/reference/java/lang/Object ` |---|---| | ` https://developer.android.com/reference/java/lang/Object` | ` https://developer.android.com/reference/java/lang/Object#clone()() ` Creates and returns a copy of this object. | | ` boolean` | ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) ` Indicates whether some other object is "equal to" this one. | | ` void` | ` https://developer.android.com/reference/java/lang/Object#finalize()() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. | | ` final https://developer.android.com/reference/java/lang/Class<?>` | ` https://developer.android.com/reference/java/lang/Object#getClass()() ` Returns the runtime class of this `Object`. | | ` int` | ` https://developer.android.com/reference/java/lang/Object#hashCode()() ` Returns a hash code value for the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notify()() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notifyAll()() ` Wakes up all threads that are waiting on this object's monitor. | | ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/java/lang/Object#toString()() ` Returns a string representation of the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait()() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*. | ||

## Public constructors

### Builder

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [U Extensions 13](https://developer.android.com/sdkExtensions)

```
public Builder (int repetitions)
```

<br />

<br />

| Parameters ||
|---|---|
| `repetitions` | `int`: The number of times this block should be repeated by the user. <br /> |

## Public methods

### addStep

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [U Extensions 13](https://developer.android.com/sdkExtensions)

```
public PlannedExerciseBlock.Builder addStep (PlannedExerciseStep step)
```

Adds a `https://developer.android.com/reference/android/health/connect/datatypes/PlannedExerciseStep`.

<br />

| Parameters ||
|---|---|
| `step` | `PlannedExerciseStep`: This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/health/connect/datatypes/PlannedExerciseBlock.Builder` | This value cannot be `null`. <br /> |

### build

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [U Extensions 13](https://developer.android.com/sdkExtensions)

```
public PlannedExerciseBlock build ()
```

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/health/connect/datatypes/PlannedExerciseBlock` | Object of `https://developer.android.com/reference/android/health/connect/datatypes/PlannedExerciseBlock`. This value cannot be `null`. <br /> |

### clearSteps

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [U Extensions 13](https://developer.android.com/sdkExtensions)

```
public PlannedExerciseBlock.Builder clearSteps ()
```

Clears the `https://developer.android.com/reference/android/health/connect/datatypes/PlannedExerciseStep` entries.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/health/connect/datatypes/PlannedExerciseBlock.Builder` | This value cannot be `null`. <br /> |

### setDescription

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [U Extensions 13](https://developer.android.com/sdkExtensions)

```
public PlannedExerciseBlock.Builder setDescription (CharSequence description)
```

Sets the description.

<br />

| Parameters ||
|---|---|
| `description` | `CharSequence`: This value may be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/health/connect/datatypes/PlannedExerciseBlock.Builder` | This value cannot be `null`. <br /> |

### setRepetitions

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [U Extensions 13](https://developer.android.com/sdkExtensions)

```
public PlannedExerciseBlock.Builder setRepetitions (int repetitions)
```

Sets the number of repetitions.

<br />

| Parameters ||
|---|---|
| `repetitions` | `int` <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/health/connect/datatypes/PlannedExerciseBlock.Builder` | This value cannot be `null`. <br /> |

### setSteps

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in [U Extensions 13](https://developer.android.com/sdkExtensions)

```
public PlannedExerciseBlock.Builder setSteps (List<PlannedExerciseStep> steps)
```

Sets the `https://developer.android.com/reference/android/health/connect/datatypes/PlannedExerciseStep` entries.

<br />

| Parameters ||
|---|---|
| `steps` | `List`: This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/health/connect/datatypes/PlannedExerciseBlock.Builder` | This value cannot be `null`. <br /> |