ExerciseSegment


public final class ExerciseSegment


Represents particular exercise within an exercise session.

Each segment contains start and end time of the exercise, exercise type and optional metrics such as number of repetitions, weight used, set index, and rate of perceived exertion.

Summary

Constants

static final int

Use this type for arm curls.

static final int

Use this type for back extensions.

static final int

Use this type for ball slams.

static final int

Use this type for barbel shoulder press.

static final int

Use this type for bench presses.

static final int

Use this type for bench sit up.

static final int

Use this type for biking.

static final int

Use this type for stationary biking.

static final int

Use this type for burpees.

static final int

Use this type for crunches.

static final int

Use this type for deadlifts.

static final int

Use this type for double arms triceps extensions.

static final int

Use this type for left arm dumbbell curl.

static final int
static final int

Use this type for right arm dumbbell curl.

static final int

Use this type for dumbbell lateral raises.

static final int

Use this type for dumbbells rows.

static final int

Use this type for left arm triceps extensions.

static final int

Use this type for right arm triceps extensions.

static final int

Use this type for two arms triceps extensions.

static final int

Use this type for elliptical workout.

static final int

Use this type for forward twists.

static final int

Use this type for front raises.

static final int

Use this type for high intensity training.

static final int

Use this type for hip thrusts.

static final int

Use this type for hula-hoops.

static final int

Use this type for jumping jacks.

static final int

Use this type for jump rope.

static final int

Use this type for kettlebell swings.

static final int

Use this type for lateral raises.

static final int

Use this type for lat pull-downs.

static final int

Use this type for leg curls.

static final int

Use this type for leg extensions.

static final int

Use this type for leg presses.

static final int

Use this type for leg raises.

static final int

Use this type for lunges.

static final int

Use this type for mountain climber.

static final int

Use this type for other workout.

static final int

Use this type for the pause.

static final int

Use this type for pilates.

static final int

Use this type for plank.

static final int

Use this type for pull-ups.

static final int

Use this type for punches.

static final int

Use this type for the rest.

static final int

Use this type for rowing machine workout.

static final int

Use this type for running.

static final int

Use this type for treadmill running.

static final int
static final int

Use this type for shoulder press.

static final int

Use this type for sit-ups.

static final int

Use this type for squats.

static final int

Use this type for stair climbing.

static final int

Use this type for stair climbing machine.

static final int

Use this type for stretching.

static final int

Use this type for backstroke swimming.

static final int

Use this type for breaststroke swimming.

static final int

Use this type for butterfly swimming.

static final int
static final int

Use this type for mixed swimming.

static final int

Use this type for swimming in open water.

static final int

Use this type if other swimming styles are not suitable.

static final int

Use this type for swimming in the pool.

static final int

Use this type if the type of the exercise segment is not known.

static final int

Use this type for upper twists.

static final int

Use this type for walking.

static final int

Use this type for weightlifting.

static final int

Use this type for wheelchair.

static final int

Use this type for yoga.

Public constructors

ExerciseSegment(
    @NonNull Instant startTime,
    @NonNull Instant endTime,
    int segmentType,
    int repetitions,
    Mass weight,
    Integer setIndex,
    Float rateOfPerceivedExertion
)

Public methods

boolean
equals(Object other)
final @NonNull Instant
final Float

Rate of perceived exertion (RPE) for the segment.

final int

Number of repetitions in the segment.

final int

Type of segment (e.g. biking, plank).

final Integer

Index of the set in the session.

final @NonNull Instant
final Mass

Weight used in the segment.

int
static final boolean
isSegmentTypeCompatibleWithSessionType(
    int segmentType,
    int sessionType
)

Is a segment type compatible with a session type.

@NonNull String

Constants

EXERCISE_SEGMENT_TYPE_ARM_CURL

public static final int EXERCISE_SEGMENT_TYPE_ARM_CURL = 1

Use this type for arm curls.

EXERCISE_SEGMENT_TYPE_BACK_EXTENSION

public static final int EXERCISE_SEGMENT_TYPE_BACK_EXTENSION = 2

Use this type for back extensions.

EXERCISE_SEGMENT_TYPE_BALL_SLAM

public static final int EXERCISE_SEGMENT_TYPE_BALL_SLAM = 3

Use this type for ball slams.

EXERCISE_SEGMENT_TYPE_BARBELL_SHOULDER_PRESS

public static final int EXERCISE_SEGMENT_TYPE_BARBELL_SHOULDER_PRESS = 4

Use this type for barbel shoulder press.

EXERCISE_SEGMENT_TYPE_BENCH_PRESS

public static final int EXERCISE_SEGMENT_TYPE_BENCH_PRESS = 5

Use this type for bench presses.

EXERCISE_SEGMENT_TYPE_BENCH_SIT_UP

public static final int EXERCISE_SEGMENT_TYPE_BENCH_SIT_UP = 6

Use this type for bench sit up.

EXERCISE_SEGMENT_TYPE_BIKING

public static final int EXERCISE_SEGMENT_TYPE_BIKING = 7

Use this type for biking.

EXERCISE_SEGMENT_TYPE_BIKING_STATIONARY

public static final int EXERCISE_SEGMENT_TYPE_BIKING_STATIONARY = 8

Use this type for stationary biking.

EXERCISE_SEGMENT_TYPE_BURPEE

public static final int EXERCISE_SEGMENT_TYPE_BURPEE = 9

Use this type for burpees.

EXERCISE_SEGMENT_TYPE_CRUNCH

public static final int EXERCISE_SEGMENT_TYPE_CRUNCH = 10

Use this type for crunches.

EXERCISE_SEGMENT_TYPE_DEADLIFT

public static final int EXERCISE_SEGMENT_TYPE_DEADLIFT = 11

Use this type for deadlifts.

EXERCISE_SEGMENT_TYPE_DOUBLE_ARM_TRICEPS_EXTENSION

public static final int EXERCISE_SEGMENT_TYPE_DOUBLE_ARM_TRICEPS_EXTENSION = 12

Use this type for double arms triceps extensions.

EXERCISE_SEGMENT_TYPE_DUMBBELL_CURL_LEFT_ARM

public static final int EXERCISE_SEGMENT_TYPE_DUMBBELL_CURL_LEFT_ARM = 13

Use this type for left arm dumbbell curl.

EXERCISE_SEGMENT_TYPE_DUMBBELL_CURL_RIGHT_ARM

public static final int EXERCISE_SEGMENT_TYPE_DUMBBELL_CURL_RIGHT_ARM = 14

EXERCISE_SEGMENT_TYPE_DUMBBELL_FRONT_RAISE

public static final int EXERCISE_SEGMENT_TYPE_DUMBBELL_FRONT_RAISE = 15

Use this type for right arm dumbbell curl.

EXERCISE_SEGMENT_TYPE_DUMBBELL_LATERAL_RAISE

public static final int EXERCISE_SEGMENT_TYPE_DUMBBELL_LATERAL_RAISE = 16

Use this type for dumbbell lateral raises.

EXERCISE_SEGMENT_TYPE_DUMBBELL_ROW

public static final int EXERCISE_SEGMENT_TYPE_DUMBBELL_ROW = 17

Use this type for dumbbells rows.

EXERCISE_SEGMENT_TYPE_DUMBBELL_TRICEPS_EXTENSION_LEFT_ARM

public static final int EXERCISE_SEGMENT_TYPE_DUMBBELL_TRICEPS_EXTENSION_LEFT_ARM = 18

Use this type for left arm triceps extensions.

EXERCISE_SEGMENT_TYPE_DUMBBELL_TRICEPS_EXTENSION_RIGHT_ARM

public static final int EXERCISE_SEGMENT_TYPE_DUMBBELL_TRICEPS_EXTENSION_RIGHT_ARM = 19

Use this type for right arm triceps extensions.

EXERCISE_SEGMENT_TYPE_DUMBBELL_TRICEPS_EXTENSION_TWO_ARM

public static final int EXERCISE_SEGMENT_TYPE_DUMBBELL_TRICEPS_EXTENSION_TWO_ARM = 20

Use this type for two arms triceps extensions.

EXERCISE_SEGMENT_TYPE_ELLIPTICAL

public static final int EXERCISE_SEGMENT_TYPE_ELLIPTICAL = 21

Use this type for elliptical workout.

EXERCISE_SEGMENT_TYPE_FORWARD_TWIST

public static final int EXERCISE_SEGMENT_TYPE_FORWARD_TWIST = 22

Use this type for forward twists.

EXERCISE_SEGMENT_TYPE_FRONT_RAISE

public static final int EXERCISE_SEGMENT_TYPE_FRONT_RAISE = 23

Use this type for front raises.

EXERCISE_SEGMENT_TYPE_HIGH_INTENSITY_INTERVAL_TRAINING

public static final int EXERCISE_SEGMENT_TYPE_HIGH_INTENSITY_INTERVAL_TRAINING = 24

Use this type for high intensity training.

EXERCISE_SEGMENT_TYPE_HIP_THRUST

public static final int EXERCISE_SEGMENT_TYPE_HIP_THRUST = 25

Use this type for hip thrusts.

EXERCISE_SEGMENT_TYPE_HULA_HOOP

public static final int EXERCISE_SEGMENT_TYPE_HULA_HOOP = 26

Use this type for hula-hoops.

EXERCISE_SEGMENT_TYPE_JUMPING_JACK

public static final int EXERCISE_SEGMENT_TYPE_JUMPING_JACK = 27

Use this type for jumping jacks.

EXERCISE_SEGMENT_TYPE_JUMP_ROPE

public static final int EXERCISE_SEGMENT_TYPE_JUMP_ROPE = 28

Use this type for jump rope.

EXERCISE_SEGMENT_TYPE_KETTLEBELL_SWING

public static final int EXERCISE_SEGMENT_TYPE_KETTLEBELL_SWING = 29

Use this type for kettlebell swings.

EXERCISE_SEGMENT_TYPE_LATERAL_RAISE

public static final int EXERCISE_SEGMENT_TYPE_LATERAL_RAISE = 30

Use this type for lateral raises.

EXERCISE_SEGMENT_TYPE_LAT_PULL_DOWN

public static final int EXERCISE_SEGMENT_TYPE_LAT_PULL_DOWN = 31

Use this type for lat pull-downs.