Guest User

Untitled

a guest
Apr 20th, 2018
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. public Collection<Country> getAllCountries() {
  2. Set<Country> allCountries = new HashSet<Country>();
  3. for (Continent contEnum: Continent.values()) {
  4. if (continents.containsKey(contEnum)) {
  5. allCountries.addAll(continents.get(contEnum));
  6. }
  7. }
  8. return Collections.unmodifiableCollection(allCountries);
  9. }
Add Comment
Please, Sign In to add comment