Example #1
0
 private ArrayList<String> getAllCities() {
   ArrayList<City> cities = cityDB.getAllCity();
   ArrayList<String> ret = new ArrayList<String>();
   for (City city : cities) {
     ret.add(city.getCity());
   }
   return ret;
 }
Example #2
0
 private ArrayList<String> getAllProvinces() {
   ArrayList<String> provinces = new ArrayList<String>();
   ArrayList<City> cities = cityDB.getAllCity();
   for (City city : cities) {
     String provinceName = city.getProvince();
     if (!provinces.contains(provinceName)) provinces.add(provinceName);
   }
   return provinces;
 }