I am currently creating a Map<String, Map<LocalDate, Integer>>
like this, where the Integer
represents seconds:
Map<String, Map<LocalDate, Integer>> map = stream.collect(Collectors.groupingBy(
x -> x.getProject(),
Collectors.groupingBy(
x -> x.getDate(),
Collectors.summingInt(t -> t.getDuration().toSecondOfDay())
)
));
How could I instead create a Map<String, Map<LocalDate, Duration>>
?