Minor code cleanup.

This commit is contained in:
Johannes Mockenhaupt 2017-11-15 11:23:20 +01:00
parent 51d242a3fb
commit 5ed97d297f
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -30,21 +30,21 @@ public class Profile {
private JSONObject json; private JSONObject json;
private String units = null; private String units = null;
double dia = Constants.defaultDIA; private double dia = Constants.defaultDIA;
TimeZone timeZone = TimeZone.getDefault(); private TimeZone timeZone = TimeZone.getDefault();
JSONArray isf; private JSONArray isf;
private LongSparseArray<Double> isf_v = null; // oldest at index 0 private LongSparseArray<Double> isf_v = null; // oldest at index 0
JSONArray ic; private JSONArray ic;
private LongSparseArray<Double> ic_v = null; // oldest at index 0 private LongSparseArray<Double> ic_v = null; // oldest at index 0
JSONArray basal; private JSONArray basal;
private LongSparseArray<Double> basal_v = null; // oldest at index 0 private LongSparseArray<Double> basal_v = null; // oldest at index 0
JSONArray targetLow; private JSONArray targetLow;
private LongSparseArray<Double> targetLow_v = null; // oldest at index 0 private LongSparseArray<Double> targetLow_v = null; // oldest at index 0
JSONArray targetHigh; private JSONArray targetHigh;
private LongSparseArray<Double> targetHigh_v = null; // oldest at index 0 private LongSparseArray<Double> targetHigh_v = null; // oldest at index 0
int percentage = 100; private int percentage = 100;
int timeshift = 0; private int timeshift = 0;
public Profile(JSONObject json, String units) { public Profile(JSONObject json, String units) {
this(json, 100, 0); this(json, 100, 0);
@ -206,7 +206,7 @@ public class Profile {
return shiftedTime; return shiftedTime;
} }
double getMultiplier(LongSparseArray<Double> array) { private double getMultiplier(LongSparseArray<Double> array) {
double multiplier = 1d; double multiplier = 1d;
if (array == isf_v) if (array == isf_v)
@ -220,7 +220,7 @@ public class Profile {
return multiplier; return multiplier;
} }
double getMultiplier(JSONArray array) { private double getMultiplier(JSONArray array) {
double multiplier = 1d; double multiplier = 1d;
if (array == isf) if (array == isf)