- // remove all the null values that is the start time for another value
- .filter(jo -> !jo.get(VALUE).isJsonNull() || !propStartTimes.get(jo.get(KEY).getAsString()).contains(jo.get(TIMESTAMP).getAsLong()))
- // sort by ts in decreasing order
- .sorted((o1, o2) -> {
- if (o1.get(TIMESTAMP).getAsLong() == o2.get(TIMESTAMP).getAsLong()) {
- return o1.get(KEY).getAsString().compareTo(o2.get(KEY).getAsString());
- } else {
- return Long.compare(o2.get(TIMESTAMP).getAsLong(), o1.get(TIMESTAMP).getAsLong());
- }
- }).forEach(jsonArray::add);
+ // remove all the null values that is the start time for another value
+ .filter(jo -> !jo.get(VALUE).isJsonNull()
+ || !propStartTimes.get(jo.get(KEY).getAsString()).contains(jo.get(TIMESTAMP).getAsLong()))
+ // sort by ts in decreasing order
+ .sorted((o1, o2) -> {
+ if (o1.get(TIMESTAMP).getAsLong() == o2.get(TIMESTAMP).getAsLong()) {
+ return o1.get(KEY).getAsString().compareTo(o2.get(KEY).getAsString());
+ } else {
+ return Long.compare(o2.get(TIMESTAMP).getAsLong(), o1.get(TIMESTAMP).getAsLong());
+ }
+ }).forEach(jsonArray::add);