Add MFTSetGroupLog set collection manipulation methods.

Commit
f7544c6b0797adf2712591c89f68a39ff6fc85f2
Author
Marius Peter <dev@marius-peter.com>
Author date
Committer
Marius Peter <dev@marius-peter.com>
Committer date
Changed files
src/MyFitnessTracker-Core/MFTSetGroupLog.class.st
index 00d8d0c8..92f49686 100644..100644
@@ -34,6 +34,12 @@
34 34 ]
35 35
36 36 { #category : 'initialization' }
37 Added: MFTSetGroupLog >> addSet: aMFTSetLog1 before: aMFTsetLog2 [
38 Added:
39 Added: sets add: aMFTSetLog1 before: aMFTsetLog2
40 Added: ]
41 Added:
42 Added: { #category : 'initialization' }
37 43 MFTSetGroupLog >> canonicalName [
38 44
39 45 ^ prescription
@@ -41,6 +47,12 @@
41 47 ifNotNil: [ prescription canonicalName ]
42 48 ]
43 49
50 Added: { #category : 'accessing' }
51 Added: MFTSetGroupLog >> indexOfSet: aMFTSetLog [
52 Added:
53 Added: ^ sets indexOf: aMFTSetLog
54 Added: ]
55 Added:
44 56 { #category : 'initialization' }
45 57 MFTSetGroupLog >> initialize [
46 58
@@ -87,6 +99,12 @@
87 99 prescription := aMFTSetGroupPrescription
88 100 ]
89 101
102 Added: { #category : 'removing' }
103 Added: MFTSetGroupLog >> removeSet: aMFTSetLog [
104 Added:
105 Added: sets remove: aMFTSetLog
106 Added: ]
107 Added:
90 108 { #category : 'initialization' }
91 109 MFTSetGroupLog >> setLogForPrescription: aMFTSetPrescription [
92 110
@@ -105,4 +123,10 @@
105 123 MFTSetGroupLog >> sets: aMFTSetLogCollection [
106 124
107 125 sets := aMFTSetLogCollection
126 Added: ]
127 Added:
128 Added: { #category : 'as yet unclassified' }
129 Added: MFTSetGroupLog >> setsGroupedByExercise [
130 Added:
131 Added: ^ sets groupedBy: #exercise
108 132 ]
src/MyFitnessTracker-Core/MFTSetLog.class.st
index 835be5ea..aed63589 100644..100644
@@ -71,7 +71,7 @@
71 71 MFTSetLog >> intensityFactor [
72 72
73 73 failureAchieved ifTrue: [ ^ 100 ].
74 Removed: "TODO: determine intensity factor as a function of PR"
74 Added: "TODO: determine intensity factor as a function of PR and maybe workout duration"
75 75 ^ 50
76 76 ]
77 77