@Test public void TestGetOpenBorder() { assertTrue(_reader.isOpen("country1", "country2")); assertFalse(_reader.isOpen("country1", "country3")); }
public boolean isOpen(String c1, String c2) { if(openBorders.containsKey(c1)) { return openBorders.get(c1).contains(c2); } else if(openBorders.containsKey(c2)) return openBorders.get(c2).contains(c1); return false; }
CountryBordersReader { public boolean isOpen(String c1, String c2) { if(openBorders.containsKey(c1)) { return openBorders.get(c1).contains(c2); } else if(openBorders.containsKey(c2)) return openBorders.get(c2).contains(c1); return false; } }
CountryBordersReader { public boolean isOpen(String c1, String c2) { if(openBorders.containsKey(c1)) { return openBorders.get(c1).contains(c2); } else if(openBorders.containsKey(c2)) return openBorders.get(c2).contains(c1); return false; } CountryBordersReader();  CountryBordersReader(String filepath, String idsPath, String openPath); }
CountryBordersReader { public boolean isOpen(String c1, String c2) { if(openBorders.containsKey(c1)) { return openBorders.get(c1).contains(c2); } else if(openBorders.containsKey(c2)) return openBorders.get(c2).contains(c1); return false; } 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 boolean isOpen(String c1, String c2) { if(openBorders.containsKey(c1)) { return openBorders.get(c1).contains(c2); } else if(openBorders.containsKey(c2)) return openBorders.get(c2).contains(c1); return false; } 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; }