Update JavaDoc.

This commit is contained in:
Johannes Mockenhaupt 2018-10-14 14:36:05 +02:00
parent 34182b81a1
commit b0fcbf3013
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -653,11 +653,7 @@ public class ComboPlugin extends PluginBase implements PumpInterface, Constraint
} }
} }
/** /** Creates a treatment record based on the request in DetailBolusInfo and the delivered bolus. */
* Updates a DetailedBolusInfo from a pump bolus and adds it as a Treatment to the DB.
* Handles edge cases when dates aren't unique which are extremely unlikely to occur,
* but if they do, the user should be warned since a bolus will be missing from calculations.
*/
private boolean addBolusToTreatments(DetailedBolusInfo detailedBolusInfo, Bolus lastPumpBolus) { private boolean addBolusToTreatments(DetailedBolusInfo detailedBolusInfo, Bolus lastPumpBolus) {
DetailedBolusInfo dbi = detailedBolusInfo.copy(); DetailedBolusInfo dbi = detailedBolusInfo.copy();
dbi.date = calculateFakeBolusDate(lastPumpBolus); dbi.date = calculateFakeBolusDate(lastPumpBolus);
@ -1141,6 +1137,7 @@ public class ComboPlugin extends PluginBase implements PumpInterface, Constraint
return historyResult.success; return historyResult.success;
} }
/** Return value indicates whether a new record was created. */
private boolean updateDbFromPumpHistory(@NonNull PumpHistory history) { private boolean updateDbFromPumpHistory(@NonNull PumpHistory history) {
boolean updated = false; boolean updated = false;
for (Bolus pumpBolus : history.bolusHistory) { for (Bolus pumpBolus : history.bolusHistory) {