public class Workout extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Workout.IntensityLevel
Indicates the intensity level of the workout
|
static class |
Workout.WorkoutType
Class or type of the workout
|
Constructor and Description |
---|
Workout()
Constructor, initializes the instance
|
Modifier and Type | Method and Description |
---|---|
void |
addWorkoutStep(int id,
WorkoutStep workoutStep)
Add given workout step to the workout
|
String |
getDescription(int id)
Returns a description text from the list of descriptions associated
with this workout
|
Workout.IntensityLevel |
getIntensityLevel()
Get the intensity level of the workout
|
HashMap<Integer,WorkoutStep> |
getSteps()
Returns the list of steps that make up the workout
|
int |
getUnknown11()
Get the unknown 11 value
|
byte[] |
getWorkoutData()
Returns the workout as protobuf data
|
int |
getWorkoutDataLength()
Return the length of the protobuf data
|
String |
getWorkoutDescription()
Returns the description of the workout
|
byte[] |
getWorkoutMd5Hash()
Return the MD5 hash of the protobuf data
|
String |
getWorkoutName()
Returns the name of the workout
|
Workout.WorkoutType |
getWorkoutType()
Returns the class of workout
|
byte[] |
getWorkoutUid()
Gets the unknonwn MD5 hash
|
void |
putDescription(int id,
String descriptionText)
This method adds a description to the list of descriptions associated
with this workout
|
void |
setIntensityLevel(Workout.IntensityLevel intensityLevel)
Sets the intensity level of the workout
|
void |
setUnknown11(int unknown11)
Set the unknown11 value
|
void |
setWorkoutDescription(int workoutDescriptionId)
Sets the workout description, as ID in the descriptions list
|
void |
setWorkoutDescription(String description)
Sets the workout description as String.
|
void |
setWorkoutName(int workoutNameId)
Sets the workout name, as ID in the descriptions list
|
void |
setWorkoutName(String name)
Sets the workout name as String.
|
void |
setWorkoutType(Workout.WorkoutType workoutType)
Sets the class/type of the workout
|
void |
setWorkoutUid(byte[] md5)
Set the unknown MD5 hash
|
String |
toString()
Returns a textual representation of the workout
|
public void putDescription(int id, String descriptionText)
id
- ID of the descriptiondescriptionText
- Description textpublic String getDescription(int id)
id
- ID of the descriptionpublic void setWorkoutName(int workoutNameId)
workoutNameId
- The ID in the description listpublic void setWorkoutName(String name)
name
- Name to addpublic String getWorkoutName()
public void setWorkoutDescription(String description)
description
- Description to addpublic void setWorkoutDescription(int workoutDescriptionId)
workoutDescriptionId
- The ID in the description listpublic String getWorkoutDescription()
public byte[] getWorkoutUid()
public void setWorkoutUid(byte[] md5)
md5
- The hash as 16 byte valuepublic int getUnknown11()
public void setUnknown11(int unknown11)
unknown11
- The unknown11 valuepublic void setWorkoutType(Workout.WorkoutType workoutType)
workoutType
- The class/typepublic Workout.WorkoutType getWorkoutType()
public Workout.IntensityLevel getIntensityLevel()
public void setIntensityLevel(Workout.IntensityLevel intensityLevel)
intensityLevel
- The intensity levelpublic HashMap<Integer,WorkoutStep> getSteps()
public void addWorkoutStep(int id, WorkoutStep workoutStep)
id
- Sequence number of the stepworkoutStep
- Step to addpublic byte[] getWorkoutData()
public int getWorkoutDataLength()
public byte[] getWorkoutMd5Hash()
Copyright © 2023. All rights reserved.