factorize a non-use method (after finding another method

This commit is contained in:
jacques 2022-07-30 08:34:11 +02:00
parent 0172379702
commit b3079837d3

View file

@ -59,4 +59,15 @@ public class Utils {
}
});
}
public static void rearrangePrescriptionList(List<Prescription> prescriptionList) {
Prescription currentPrescription = null;
for (int i=0 ; i < prescriptionList.size(); i++ ){
currentPrescription = prescriptionList.get(i);
if (currentPrescription.getTake() == 0) {
prescriptionList.remove(currentPrescription);
prescriptionList.add(prescriptionList.size(), currentPrescription);
}
}
}
}