src/main/java/it/uniroma2/dicii/sabd/covidproject/Query1.java
/* Utility method that performs the first phase of absolute statistics computation from cumulative measurements
    *  (see main() below) */
Utility method that performs the first phase of absolute statistics computation from cumulative measurements
below)
Utility method that performs the first phase of absolute statistics computation from cumulative measurements below )
private static Iterator<Tuple2<Integer, ItalianWeeklyStats>>  duplicateWeeklyStats(ItalianDailyStats italianDailyStats) {
        List<Tuple2<Integer, ItalianWeeklyStats>> pairs = new ArrayList<>();
        Integer weekIndex = italianDailyStats.getWeekOfYear();
        Integer cumulativeCured = italianDailyStats.getCumulativeCured();
        Integer cumulativeSwabs = italianDailyStats.getCumulativeSwabs();
        pairs.add(new Tuple2<>(weekIndex, new ItalianWeeklyStats((float)cumulativeCured, (float)cumulativeSwabs)));
        pairs.add(new Tuple2<>(weekIndex + 1, new ItalianWeeklyStats((float)cumulativeCured, (float)cumulativeSwabs)));
        return pairs.iterator();
    }
private static Iterator < Tuple2 < Integer , ItalianWeeklyStats > > duplicateWeeklyStats ( ItalianDailyStats italianDailyStats ) { List < Tuple2 < Integer , ItalianWeeklyStats > > pairs = new ArrayList < > ( ) ; Integer weekIndex = italianDailyStats . getWeekOfYear ( ) ; Integer cumulativeCured = italianDailyStats . getCumulativeCured ( ) ; Integer cumulativeSwabs = italianDailyStats . getCumulativeSwabs ( ) ; pairs . add ( new Tuple2 < > ( weekIndex , new ItalianWeeklyStats ( ( float ) cumulativeCured , ( float ) cumulativeSwabs ) ) ) ; pairs . add ( new Tuple2 < > ( weekIndex + 1 , new ItalianWeeklyStats ( ( float ) cumulativeCured , ( float ) cumulativeSwabs ) ) ) ; return pairs . iterator ( ) ; }
Utility method that performs the first phase of absolute statistics computation from cumulative measurements
  (see main() below)
Utility method that performs the first phase of absolute statistics computation from cumulative measurements ( see main () below )