|
25 | 25 | import java.util.Map;
|
26 | 26 |
|
27 | 27 | import com.graphhopper.routing.ev.Country;
|
| 28 | +import com.graphhopper.routing.util.countryrules.europe.*; |
28 | 29 |
|
29 | 30 | public class CountryRuleFactory {
|
30 | 31 |
|
31 | 32 | private final Map<Country, CountryRule> rules = new EnumMap<>(Country.class);
|
32 | 33 |
|
33 | 34 | public CountryRuleFactory() {
|
| 35 | + |
| 36 | + // Europe |
| 37 | + rules.put(ALB, new AlbaniaCountryRule()); |
| 38 | + rules.put(AND, new AndorraCountryRule()); |
34 | 39 | rules.put(AUT, new AustriaCountryRule());
|
| 40 | + rules.put(BEL, new BelgiumCountryRule()); |
| 41 | + rules.put(BGR, new BulgariaCountryRule()); |
| 42 | + rules.put(BIH, new BosniaHerzegovinaCountryRule()); |
| 43 | + rules.put(BLR, new BelarusCountryRule()); |
| 44 | + rules.put(CHE, new SwitzerlandCountryRule()); |
| 45 | + rules.put(CZE, new CzechiaCountryRule()); |
35 | 46 | rules.put(DEU, new GermanyCountryRule());
|
| 47 | + rules.put(DNK, new DenmarkCountryRule()); |
| 48 | + rules.put(ESP, new SpainCountryRule()); |
| 49 | + rules.put(EST, new EstoniaCountryRule()); |
| 50 | + rules.put(FIN, new FinlandCountryRule()); |
| 51 | + rules.put(FRA, new FranceCountryRule()); |
| 52 | + rules.put(FRO, new FaroeIslandsCountryRule()); |
| 53 | + rules.put(GGY, new GuernseyCountryRule()); |
| 54 | + rules.put(GIB, new GibraltarCountryRule()); |
| 55 | + rules.put(GBR, new UnitedKingdomCountryRule()); |
| 56 | + rules.put(GRC, new GreeceCountryRule()); |
| 57 | + rules.put(HRV, new CroatiaCountryRule()); |
| 58 | + rules.put(HUN, new HungaryCountryRule()); |
| 59 | + rules.put(IMN, new IsleOfManCountryRule()); |
| 60 | + rules.put(IRL, new IrelandCountryRule()); |
| 61 | + rules.put(ISL, new IcelandCountryRule()); |
| 62 | + rules.put(ITA, new ItalyCountryRule()); |
| 63 | + rules.put(JEY, new JerseyCountryRule()); |
| 64 | + rules.put(LIE, new LiechtensteinCountryRule()); |
| 65 | + rules.put(LTU, new LithuaniaCountryRule()); |
| 66 | + rules.put(LUX, new LuxembourgCountryRule()); |
| 67 | + rules.put(LVA, new LatviaCountryRule()); |
| 68 | + rules.put(MCO, new MonacoCountryRule()); |
| 69 | + rules.put(MDA, new MoldovaCountryRule()); |
| 70 | + rules.put(MKD, new NorthMacedoniaCountryRule()); |
| 71 | + rules.put(MLT, new MaltaCountryRule()); |
| 72 | + rules.put(MNE, new MontenegroCountryRule()); |
| 73 | + rules.put(NLD, new NetherlandsCountryRule()); |
| 74 | + rules.put(NOR, new NorwayCountryRule()); |
| 75 | + rules.put(POL, new PolandCountryRule()); |
| 76 | + rules.put(PRT, new PortugalCountryRule()); |
| 77 | + rules.put(ROU, new RomaniaCountryRule()); |
| 78 | + rules.put(RUS, new RussiaCountryRule()); |
| 79 | + rules.put(SMR, new SanMarinoCountryRule()); |
| 80 | + rules.put(SRB, new SerbiaCountryRule()); |
| 81 | + rules.put(SVK, new SlovakiaCountryRule()); |
| 82 | + rules.put(SVN, new SloveniaCountryRule()); |
| 83 | + rules.put(SWE, new SwedenCountryRule()); |
| 84 | + rules.put(UKR, new UkraineCountryRule()); |
| 85 | + rules.put(VAT, new VaticanCityCountryRule()); |
36 | 86 | }
|
37 | 87 |
|
38 | 88 | public CountryRule getCountryRule(Country country) {
|
|
0 commit comments