All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.nls.util.Regions Maven / Gradle / Ivy
package com.nls.util;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
public final class Regions {
public enum Name {
NorthAmerica,
SouthAmerica,
Europe,
AfricaAndMiddleEast,
AsiaPacific
}
private static final Map REGION_MAP = build();
private Regions() {
}
private static Map build() {
Map map = new HashMap<>();
map.put(Name.NorthAmerica, new Region(Name.NorthAmerica, "North America",
"USA", "CAN"));
map.put(Name.SouthAmerica, new Region(Name.SouthAmerica, "South America",
"BRA"));
map.put(Name.Europe, new Region(Name.Europe, "Europe",
"GBR", "AUT", "BEL", "FRA", "DEU", "IRL", "ITA", "POL",
"PRT", "ESP", "CHE"));
map.put(Name.AfricaAndMiddleEast, new Region(Name.AfricaAndMiddleEast, "Africa & Middle East",
"KEN", "MAR", "NGA", "SAU", "ZAF", "ARE", "MOZ", "NAM", "TZA", "ZWE", "ZMB"));
map.put(Name.AsiaPacific, new Region(Name.AsiaPacific, "Asia Pacific",
"AUS", "CHN", "HKG", "IDN", "MYS", "PHL", "SGP", "THA"));
return Collections.unmodifiableMap(map);
}
public static Region get(Name name) {
return REGION_MAP.get(name);
}
}