Builder


class Builder
kotlin.Any
   ↳ android.health.connect.datatypes.PlannedExerciseStep.Builder

Builder of PlannedExerciseStep.

Summary

Public constructors
Builder(exerciseType: Int, exerciseCategory: Int, completionGoal: ExerciseCompletionGoal)

Public methods
PlannedExerciseStep.Builder

Adds a ExercisePerformanceGoal.

PlannedExerciseStep

Returns PlannedExerciseStep instance.

PlannedExerciseStep.Builder

Clears ExercisePerformanceGoal entries.

PlannedExerciseStep.Builder

Sets the ExerciseCompletionGoal.

PlannedExerciseStep.Builder

Sets the description.

PlannedExerciseStep.Builder

Sets the exercise category.

PlannedExerciseStep.Builder
setExerciseType(exerciseType: Int)

Sets the exercise type.

PlannedExerciseStep.Builder

Sets ExercisePerformanceGoal entries.

Public constructors

Builder

Builder(
    exerciseType: Int,
    exerciseCategory: Int,
    completionGoal: ExerciseCompletionGoal)
Parameters
exerciseType Int: The type of exercise to be carried out in this step, e.g. running.
Value is one of the following:
exerciseCategory Int: The category of exercise to be carried out in this step, e.g. warmup.
Value is one of the following:
completionGoal ExerciseCompletionGoal: The goal to be met to complete this step.
This value cannot be null.

Public methods

addPerformanceGoal

fun addPerformanceGoal(performanceGoal: ExercisePerformanceGoal): PlannedExerciseStep.Builder

Adds a ExercisePerformanceGoal.

Parameters
performanceGoal ExercisePerformanceGoal: This value cannot be null.
Return
PlannedExerciseStep.Builder This value cannot be null.

build

fun build(): PlannedExerciseStep

Returns PlannedExerciseStep instance.

Return
PlannedExerciseStep This value cannot be null.

clearPerformanceGoals

fun clearPerformanceGoals(): PlannedExerciseStep.Builder

Clears ExercisePerformanceGoal entries.

Return
PlannedExerciseStep.Builder This value cannot be null.

setCompletionGoal

fun setCompletionGoal(completionGoal: ExerciseCompletionGoal): PlannedExerciseStep.Builder

Sets the ExerciseCompletionGoal.

Parameters
completionGoal ExerciseCompletionGoal: This value cannot be null.
Return
PlannedExerciseStep.Builder This value cannot be null.

setDescription

fun setDescription(description: CharSequence?): PlannedExerciseStep.Builder

Sets the description.

Parameters
description CharSequence?: This value may be null.
Return
PlannedExerciseStep.Builder This value cannot be null.

setExerciseType

fun setExerciseType(exerciseType: Int): PlannedExerciseStep.Builder

Sets the exercise type.

Parameters
exerciseType Int: Value is one of the following:
Return
PlannedExerciseStep.Builder This value cannot be null.

setPerformanceGoals

fun setPerformanceGoals(performanceGoals: MutableList<ExercisePerformanceGoal!>): PlannedExerciseStep.Builder

Sets ExercisePerformanceGoal entries.

Parameters
performanceGoals MutableList<ExercisePerformanceGoal!>: This value cannot be null.
Return
PlannedExerciseStep.Builder This value cannot be null.