Dieser Commit ist enthalten in:
Ursprung
4d9aacfc3e
Commit
8b07e93a70
@ -216,6 +216,10 @@ public class Trace {
|
|||||||
* @return A list of bundles
|
* @return A list of bundles
|
||||||
*/
|
*/
|
||||||
private List<List<TNTPoint>> bundleRecords(List<TNTPoint> records, BundleFilter filter) {
|
private List<List<TNTPoint>> bundleRecords(List<TNTPoint> records, BundleFilter filter) {
|
||||||
|
if (filter == BundleFilter.NONE) {
|
||||||
|
return records.stream().map(List::of).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
List<List<TNTPoint>> bundles = new ArrayList<>();
|
List<List<TNTPoint>> bundles = new ArrayList<>();
|
||||||
|
|
||||||
recordsLoop:
|
recordsLoop:
|
||||||
@ -230,15 +234,20 @@ public class Trace {
|
|||||||
List<TNTPoint> bundle = bundles.get(i);
|
List<TNTPoint> bundle = bundles.get(i);
|
||||||
|
|
||||||
Boolean filterResult = filter.function.apply(record, bundle.get(0));
|
Boolean filterResult = filter.function.apply(record, bundle.get(0));
|
||||||
if (filterResult == null || !filterResult) {
|
if (filterResult == null) {
|
||||||
ArrayList<TNTPoint> newBundle = new ArrayList<>();
|
ArrayList<TNTPoint> newBundle = new ArrayList<>();
|
||||||
newBundle.add(record);
|
newBundle.add(record);
|
||||||
bundles.add(newBundle);
|
bundles.add(newBundle);
|
||||||
continue recordsLoop;
|
continue recordsLoop;
|
||||||
} else {
|
} else if (filterResult) {
|
||||||
bundle.add(record);
|
bundle.add(record);
|
||||||
|
continue recordsLoop;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ArrayList<TNTPoint> newBundle = new ArrayList<>();
|
||||||
|
newBundle.add(record);
|
||||||
|
bundles.add(newBundle);
|
||||||
}
|
}
|
||||||
|
|
||||||
return bundles;
|
return bundles;
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren