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 number of repetitions.

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
)

Public methods

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

Number of repetitions in the segment.

final int

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

final @NonNull Instant
int
@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.

EXERCISE_SEGMENT_TYPE_LEG_CURL

public static final int EXERCISE_SEGMENT_TYPE_LEG_CURL = 32

Use this type for leg curls.

EXERCISE_SEGMENT_TYPE_LEG_EXTENSION

public static final int EXERCISE_SEGMENT_TYPE_LEG_EXTENSION = 33

Use this type for leg extensions.

EXERCISE_SEGMENT_TYPE_LEG_PRESS

public static final int EXERCISE_SEGMENT_TYPE_LEG_PRESS = 34

Use this type for leg presses.

EXERCISE_SEGMENT_TYPE_LEG_RAISE

public static final int EXERCISE_SEGMENT_TYPE_LEG_RAISE = 35

Use this type for leg raises.

EXERCISE_SEGMENT_TYPE_LUNGE

public static final int EXERCISE_SEGMENT_TYPE_LUNGE = 36

Use this type for lunges.

EXERCISE_SEGMENT_TYPE_MOUNTAIN_CLIMBER

public static final int EXERCISE_SEGMENT_TYPE_MOUNTAIN_CLIMBER = 37

Use this type for mountain climber.

EXERCISE_SEGMENT_TYPE_OTHER_WORKOUT

public static final int EXERCISE_SEGMENT_TYPE_OTHER_WORKOUT = 38

Use this type for other workout.

EXERCISE_SEGMENT_TYPE_PAUSE

public static final int EXERCISE_SEGMENT_TYPE_PAUSE = 39

Use this type for the pause.

EXERCISE_SEGMENT_TYPE_PILATES

public static final int EXERCISE_SEGMENT_TYPE_PILATES = 40

Use this type for pilates.

EXERCISE_SEGMENT_TYPE_PLANK

public static final int EXERCISE_SEGMENT_TYPE_PLANK = 41

Use this type for plank.

EXERCISE_SEGMENT_TYPE_PULL_UP

public static final int EXERCISE_SEGMENT_TYPE_PULL_UP = 42

Use this type for pull-ups.

EXERCISE_SEGMENT_TYPE_PUNCH

public static final int EXERCISE_SEGMENT_TYPE_PUNCH = 43

Use this type for punches.

EXERCISE_SEGMENT_TYPE_REST

public static final int EXERCISE_SEGMENT_TYPE_REST = 44

Use this type for the rest.

EXERCISE_SEGMENT_TYPE_ROWING_MACHINE

public static final int EXERCISE_SEGMENT_TYPE_ROWING_MACHINE = 45

Use this type for rowing machine workout.

EXERCISE_SEGMENT_TYPE_RUNNING

public static final int EXERCISE_SEGMENT_TYPE_RUNNING = 46

Use this type for running.

EXERCISE_SEGMENT_TYPE_RUNNING_TREADMILL

public static final int EXERCISE_SEGMENT_TYPE_RUNNING_TREADMILL = 47

Use this type for treadmill running.

EXERCISE_SEGMENT_TYPE_SHOULDER_PRESS

public static final int EXERCISE_SEGMENT_TYPE_SHOULDER_PRESS = 48

EXERCISE_SEGMENT_TYPE_SINGLE_ARM_TRICEPS_EXTENSION

public static final int EXERCISE_SEGMENT_TYPE_SINGLE_ARM_TRICEPS_EXTENSION = 49

Use this type for shoulder press.

EXERCISE_SEGMENT_TYPE_SIT_UP

public static final int EXERCISE_SEGMENT_TYPE_SIT_UP = 50

Use this type for sit-ups.

EXERCISE_SEGMENT_TYPE_SQUAT

public static final int EXERCISE_SEGMENT_TYPE_SQUAT = 51

Use this type for squats.

EXERCISE_SEGMENT_TYPE_STAIR_CLIMBING

public static final int EXERCISE_SEGMENT_TYPE_STAIR_CLIMBING = 52

Use this type for stair climbing.

EXERCISE_SEGMENT_TYPE_STAIR_CLIMBING_MACHINE

public static final int EXERCISE_SEGMENT_TYPE_STAIR_CLIMBING_MACHINE = 53

Use this type for stair climbing machine.

EXERCISE_SEGMENT_TYPE_STRETCHING

public static final int EXERCISE_SEGMENT_TYPE_STRETCHING = 54

Use this type for stretching.

EXERCISE_SEGMENT_TYPE_SWIMMING_BACKSTROKE

public static final int EXERCISE_SEGMENT_TYPE_SWIMMING_BACKSTROKE = 55

Use this type for backstroke swimming.

EXERCISE_SEGMENT_TYPE_SWIMMING_BREASTSTROKE

public static final int EXERCISE_SEGMENT_TYPE_SWIMMING_BREASTSTROKE = 56

Use this type for breaststroke swimming.

EXERCISE_SEGMENT_TYPE_SWIMMING_BUTTERFLY

public static final int EXERCISE_SEGMENT_TYPE_SWIMMING_BUTTERFLY = 57

Use this type for butterfly swimming.

EXERCISE_SEGMENT_TYPE_SWIMMING_FREESTYLE

public static final int EXERCISE_SEGMENT_TYPE_SWIMMING_FREESTYLE = 58

EXERCISE_SEGMENT_TYPE_SWIMMING_MIXED

public static final int EXERCISE_SEGMENT_TYPE_SWIMMING_MIXED = 59

Use this type for mixed swimming.

EXERCISE_SEGMENT_TYPE_SWIMMING_OPEN_WATER

public static final int EXERCISE_SEGMENT_TYPE_SWIMMING_OPEN_WATER = 60

Use this type for swimming in open water.

EXERCISE_SEGMENT_TYPE_SWIMMING_OTHER

public static final int EXERCISE_SEGMENT_TYPE_SWIMMING_OTHER = 61

Use this type if other swimming styles are not suitable.

EXERCISE_SEGMENT_TYPE_SWIMMING_POOL

public static final int EXERCISE_SEGMENT_TYPE_SWIMMING_POOL = 62

Use this type for swimming in the pool.

EXERCISE_SEGMENT_TYPE_UNKNOWN

public static final int EXERCISE_SEGMENT_TYPE_UNKNOWN = 0

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

EXERCISE_SEGMENT_TYPE_UPPER_TWIST

public static final int EXERCISE_SEGMENT_TYPE_UPPER_TWIST = 63

Use this type for upper twists.

EXERCISE_SEGMENT_TYPE_WALKING

public static final int EXERCISE_SEGMENT_TYPE_WALKING = 64

Use this type for walking.

EXERCISE_SEGMENT_TYPE_WEIGHTLIFTING

public static final int EXERCISE_SEGMENT_TYPE_WEIGHTLIFTING = 65

Use this type for weightlifting.

EXERCISE_SEGMENT_TYPE_WHEELCHAIR

public static final int EXERCISE_SEGMENT_TYPE_WHEELCHAIR = 66

Use this type for wheelchair.

EXERCISE_SEGMENT_TYPE_YOGA

public static final int EXERCISE_SEGMENT_TYPE_YOGA = 67

Use this type for yoga.

Public constructors

ExerciseSegment

Added in 1.1.0-alpha10
public ExerciseSegment(
    @NonNull Instant startTime,
    @NonNull Instant endTime,
    int segmentType,
    int repetitions
)

Public methods

equals

public boolean equals(Object other)

getEndTime

Added in 1.1.0-alpha10
public final @NonNull Instant getEndTime()

getRepetitions

Added in 1.1.0-alpha10
public final int getRepetitions()

Number of repetitions in the segment. Must be non-negative.

getSegmentType

Added in 1.1.0-alpha10
public final int getSegmentType()

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

getStartTime

Added in 1.1.0-alpha10
public final @NonNull Instant getStartTime()

hashCode

public int hashCode()

toString

public @NonNull String toString()