Пример #1
0
 @Override
 public Region getRegion(Locale locale) {
   for (Region region : regions.values()) {
     if (locale.equals(region.getLocale()) && region instanceof ISOCountry) {
       return region;
     }
   }
   return null;
 }
Пример #2
0
 @Override
 public Region getRegion(RegionType type, int numericId) {
   for (Region region : regions.values()) {
     if (region.getRegionType().equals(type)
         && region.getNumericRegionCode() == numericId
         && region instanceof ISOCountry) {
       return region;
     }
   }
   return null;
 }