PlannedExerciseStep.Builder


public static final class PlannedExerciseStep.Builder
extends Object

java.lang.Object
   ↳ android.health.connect.datatypes.PlannedExerciseStep.Builder


Builder of PlannedExerciseStep.

Summary

Public constructors

Builder(int exerciseType, int exerciseCategory, ExerciseCompletionGoal completionGoal)

Public methods

PlannedExerciseStep.Builder addPerformanceGoal(ExercisePerformanceGoal performanceGoal)

Adds a ExercisePerformanceGoal.

PlannedExerciseStep build()

Returns PlannedExerciseStep instance.

PlannedExerciseStep.Builder clearPerformanceGoals()

Clears ExercisePerformanceGoal entries.

PlannedExerciseStep.Builder setCompletionGoal(ExerciseCompletionGoal completionGoal)

Sets the ExerciseCompletionGoal.

PlannedExerciseStep.Builder setDescription(CharSequence description)

Sets the description.

PlannedExerciseStep.Builder setExerciseCategory(int category)

Sets the exercise category.

PlannedExerciseStep.Builder setExerciseType(int exerciseType)

Sets the exercise type.

PlannedExerciseStep.Builder setPerformanceGoals(List<ExercisePerformanceGoal> performanceGoals)

Sets ExercisePerformanceGoal entries.

Inherited methods

Public constructors

Builder

public Builder (int exerciseType, 
                int exerciseCategory, 
                ExerciseCompletionGoal completionGoal)

Parameters
exerciseType int: The type of exercise to be carried out in this step, e.g. running. Value is ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_UNKNOWN, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_BARBELL_SHOULDER_PRESS, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_BENCH_SIT_UP, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_BIKING, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_BIKING_STATIONARY, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_DUMBBELL_CURL_LEFT_ARM, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_DUMBBELL_CURL_RIGHT_ARM, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_DUMBBELL_FRONT_RAISE, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_DUMBBELL_LATERAL_RAISE, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_DUMBBELL_TRICEPS_EXTENSION_LEFT_ARM, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_DUMBBELL_TRICEPS_EXTENSION_RIGHT_ARM, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_DUMBBELL_TRICEPS_EXTENSION_TWO_ARM, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_FORWARD_TWIST, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_ELLIPTICAL, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_HIGH_INTENSITY_INTERVAL_TRAINING, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_PILATES, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_ROWING_MACHINE, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_RUNNING, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_RUNNING_TREADMILL, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_STAIR_CLIMBING, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_STAIR_CLIMBING_MACHINE, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_STRETCHING, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_SWIMMING_OPEN_WATER, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_SWIMMING_POOL, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_UPPER_TWIST, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_WALKING, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_WEIGHTLIFTING, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_WHEELCHAIR, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_OTHER_WORKOUT, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_YOGA, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_ARM_CURL, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_BACK_EXTENSION, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_BALL_SLAM, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_BENCH_PRESS, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_BURPEE, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_CRUNCH, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_DEADLIFT, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_DOUBLE_ARM_TRICEPS_EXTENSION, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_DUMBBELL_ROW, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_FRONT_RAISE, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_HIP_THRUST, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_HULA_HOOP, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_JUMPING_JACK, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_JUMP_ROPE, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_KETTLEBELL_SWING, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_LATERAL_RAISE, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_LAT_PULL_DOWN, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_LEG_CURL, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_LEG_EXTENSION, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_LEG_PRESS, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_LEG_RAISE, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_LUNGE, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_MOUNTAIN_CLIMBER, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_PLANK, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_PULL_UP, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_PUNCH, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_SHOULDER_PRESS, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_SINGLE_ARM_TRICEPS_EXTENSION, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_SIT_UP, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_SQUAT, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_SWIMMING_FREESTYLE, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_SWIMMING_BACKSTROKE, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_SWIMMING_BREASTSTROKE, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_SWIMMING_BUTTERFLY, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_SWIMMING_MIXED, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_SWIMMING_OTHER, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_REST, or ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_PAUSE

exerciseCategory int: The category of exercise to be carried out in this step, e.g. warmup. Value is PlannedExerciseStep.EXERCISE_CATEGORY_UNKNOWN, PlannedExerciseStep.EXERCISE_CATEGORY_WARMUP, PlannedExerciseStep.EXERCISE_CATEGORY_REST, PlannedExerciseStep.EXERCISE_CATEGORY_ACTIVE, PlannedExerciseStep.EXERCISE_CATEGORY_COOLDOWN, or PlannedExerciseStep.EXERCISE_CATEGORY_RECOVERY

completionGoal ExerciseCompletionGoal: The goal to be met to complete this step. This value cannot be null.

Public methods

addPerformanceGoal

public PlannedExerciseStep.Builder addPerformanceGoal (ExercisePerformanceGoal performanceGoal)

Adds a ExercisePerformanceGoal.

Parameters
performanceGoal ExercisePerformanceGoal: This value cannot be null.

Returns
PlannedExerciseStep.Builder This value cannot be null.

build

public PlannedExerciseStep build ()

Returns PlannedExerciseStep instance.

Returns
PlannedExerciseStep This value cannot be null.

clearPerformanceGoals

public PlannedExerciseStep.Builder clearPerformanceGoals ()

Clears ExercisePerformanceGoal entries.

Returns
PlannedExerciseStep.Builder This value cannot be null.

setCompletionGoal

public PlannedExerciseStep.Builder setCompletionGoal (ExerciseCompletionGoal completionGoal)

Sets the ExerciseCompletionGoal.

Parameters
completionGoal ExerciseCompletionGoal: This value cannot be null.

Returns
PlannedExerciseStep.Builder This value cannot be null.

setDescription

public PlannedExerciseStep.Builder setDescription (CharSequence description)

Sets the description.

Parameters
description CharSequence: This value may be null.

Returns
PlannedExerciseStep.Builder This value cannot be null.

setExerciseType

public PlannedExerciseStep.Builder setExerciseType (int exerciseType)

Sets the exercise type.

Parameters
exerciseType int: Value is ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_UNKNOWN, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_BARBELL_SHOULDER_PRESS, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_BENCH_SIT_UP, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_BIKING, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_BIKING_STATIONARY, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_DUMBBELL_CURL_LEFT_ARM, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_DUMBBELL_CURL_RIGHT_ARM, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_DUMBBELL_FRONT_RAISE, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_DUMBBELL_LATERAL_RAISE, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_DUMBBELL_TRICEPS_EXTENSION_LEFT_ARM, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_DUMBBELL_TRICEPS_EXTENSION_RIGHT_ARM, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_DUMBBELL_TRICEPS_EXTENSION_TWO_ARM, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_FORWARD_TWIST, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_ELLIPTICAL, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_HIGH_INTENSITY_INTERVAL_TRAINING, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_PILATES, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_ROWING_MACHINE, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_RUNNING, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_RUNNING_TREADMILL, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_STAIR_CLIMBING, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_STAIR_CLIMBING_MACHINE, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_STRETCHING, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_SWIMMING_OPEN_WATER, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_SWIMMING_POOL, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_UPPER_TWIST, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_WALKING, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_WEIGHTLIFTING, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_WHEELCHAIR, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_OTHER_WORKOUT, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_YOGA, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_ARM_CURL, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_BACK_EXTENSION, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_BALL_SLAM, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_BENCH_PRESS, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_BURPEE, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_CRUNCH, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_DEADLIFT, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_DOUBLE_ARM_TRICEPS_EXTENSION, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_DUMBBELL_ROW, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_FRONT_RAISE, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_HIP_THRUST, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_HULA_HOOP, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_JUMPING_JACK, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_JUMP_ROPE, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_KETTLEBELL_SWING, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_LATERAL_RAISE, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_LAT_PULL_DOWN, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_LEG_CURL, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_LEG_EXTENSION, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_LEG_PRESS, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_LEG_RAISE, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_LUNGE, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_MOUNTAIN_CLIMBER, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_PLANK, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_PULL_UP, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_PUNCH, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_SHOULDER_PRESS, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_SINGLE_ARM_TRICEPS_EXTENSION, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_SIT_UP, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_SQUAT, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_SWIMMING_FREESTYLE, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_SWIMMING_BACKSTROKE, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_SWIMMING_BREASTSTROKE, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_SWIMMING_BUTTERFLY, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_SWIMMING_MIXED, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_SWIMMING_OTHER, ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_REST, or ExerciseSegmentType.EXERCISE_SEGMENT_TYPE_PAUSE

Returns
PlannedExerciseStep.Builder This value cannot be null.

setPerformanceGoals

public PlannedExerciseStep.Builder setPerformanceGoals (List<ExercisePerformanceGoal> performanceGoals)

Sets ExercisePerformanceGoal entries.

Parameters
performanceGoals List: This value cannot be null.

Returns
PlannedExerciseStep.Builder This value cannot be null.