public class WorkoutList extends Object
Constructor and Description |
---|
WorkoutList()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addListItem(WorkoutListItem item)
Add the workout metadata item to the WorkoutItemList
|
void |
addWorkout(int fileId,
Workout workout)
Add the workout to the WorkItemList
|
boolean |
appendWorkoutFromData(int fileId,
byte[] data)
Appends the workout data from the 0x00BEnnnn files, where
nnnn larger than zero
|
void |
clear()
Clears everyghing in the workout list
|
boolean |
createWorkoutListFromData(byte[] data)
Creates the workout list from the data from file 0x00BE0000
|
Workout |
getWorkout(WorkoutListItem item)
Return the workout belonging to the given list item;
|
byte[] |
getWorkoutData(int fileId)
Returns the workout as protobuf data.
|
List<WorkoutListItem> |
getWorkoutList()
Returns the list with workout metadata
|
byte[] |
getWorkoutListData()
Level 0: Returns the workout list as protobuf data
|
LinkedHashMap<Integer,Workout> |
getWorkouts()
Return the hashmap with workouts.
|
void |
sort()
Sort the list
|
String |
toString() |
public void clear()
public List<WorkoutListItem> getWorkoutList()
public LinkedHashMap<Integer,Workout> getWorkouts()
public Workout getWorkout(WorkoutListItem item)
item
- The workout list itempublic void addWorkout(int fileId, Workout workout)
fileId
- File IDworkout
- the workout to addpublic void addListItem(WorkoutListItem item)
item
- Item to addpublic boolean appendWorkoutFromData(int fileId, byte[] data)
fileId
- ID of the file representing the workoutdata
- Protobuffer encoded datapublic boolean createWorkoutListFromData(byte[] data)
data
- The datapublic void sort()
public byte[] getWorkoutListData()
public byte[] getWorkoutData(int fileId)
fileId
- The File ID (e.g. 0x00BE0001) of the workout to serializeCopyright © 2023. All rights reserved.