|
|
@ -8,6 +8,8 @@ import org.springframework.stereotype.Component; |
|
|
|
import java.time.Instant; |
|
|
|
import java.time.LocalDate; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.Map; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
@Data |
|
|
|
@Component |
|
|
@ -87,4 +89,13 @@ public class Stats { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public HashMap<String, Integer> getCountries() { |
|
|
|
return new HashMap<>() {{ |
|
|
|
countries.forEach((name, count) -> { |
|
|
|
if (name != null && count != null && count > 0) { |
|
|
|
put(name, count); |
|
|
|
} |
|
|
|
}); |
|
|
|
}}; |
|
|
|
} |
|
|
|
} |
|
|
|