Skip to content

Commit

Permalink
refactor: Slight refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Jack-Golding committed Nov 20, 2024
1 parent dfd85ae commit 0240a70
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,13 @@ public class EnumerationNumericTMRF extends TemplateMetadataRuleFormat implement
for(int i=enltmrfArray?.size()-1; i>=0; i--){

// Set value to previous pieces corresponding value
Integer value = svArray?.getAt(i)?.rawValue ?: svArray?.getAt(i)?.value
Integer value = (svArray?.getAt(i)?.rawValue ?: svArray?.getAt(i)?.value) as Integer
// Only calculate if we're past the first piece, otherwise use starting values
if(index != 0){
//If previous level has set flag to true, increment
//Always incremement on lowest level then set to false so higher levels should only ever increment with permission from lower levels
if(shouldIncrement == true){
if (value % enltmrfArray[i]?.units == 0) {
shouldIncrement = true
}else{
if (value % enltmrfArray[i]?.units != 0) {
shouldIncrement = false
}
value ++
Expand Down

0 comments on commit 0240a70

Please sign in to comment.