@Test public void TestGetCountryId() { assertEquals("1", _reader.getId("country1")); }
public String getId(String name) { if(name.equals(INTERNATIONAL_NAME)) return INTERNATIONAL_ID; if(ids.containsKey(name)) return ids.get(name).id; else return ""; }
CountryBordersReader { public String getId(String name) { if(name.equals(INTERNATIONAL_NAME)) return INTERNATIONAL_ID; if(ids.containsKey(name)) return ids.get(name).id; else return ""; } }
CountryBordersReader { public String getId(String name) { if(name.equals(INTERNATIONAL_NAME)) return INTERNATIONAL_ID; if(ids.containsKey(name)) return ids.get(name).id; else return ""; } CountryBordersReader();  CountryBordersReader(String filepath, String idsPath, String openPath); }
CountryBordersReader { public String getId(String name) { if(name.equals(INTERNATIONAL_NAME)) return INTERNATIONAL_ID; if(ids.containsKey(name)) return ids.get(name).id; else return ""; } CountryBordersReader();  CountryBordersReader(String filepath, String idsPath, String openPath); void addHierarchy(Long id, CountryBordersHierarchy hierarchy); void addId(String id, String localName, String englishName, String cca2, String cca3); void addOpenBorder(String country1, String country2); CountryBordersPolygon[] getCountry(Coordinate c); CountryBordersPolygon[] getCandidateCountry(Coordinate c); String getId(String name); String getEngName(String name); boolean isOpen(String c1, String c2); static int getCountryIdByISOCode(String code); }
CountryBordersReader { public String getId(String name) { if(name.equals(INTERNATIONAL_NAME)) return INTERNATIONAL_ID; if(ids.containsKey(name)) return ids.get(name).id; else return ""; } CountryBordersReader();  CountryBordersReader(String filepath, String idsPath, String openPath); void addHierarchy(Long id, CountryBordersHierarchy hierarchy); void addId(String id, String localName, String englishName, String cca2, String cca3); void addOpenBorder(String country1, String country2); CountryBordersPolygon[] getCountry(Coordinate c); CountryBordersPolygon[] getCandidateCountry(Coordinate c); String getId(String name); String getEngName(String name); boolean isOpen(String c1, String c2); static int getCountryIdByISOCode(String code); static final String INTERNATIONAL_NAME; static final String INTERNATIONAL_ID; static final String KEY_PROPERTIES; }