void refreshPreferredCountries(){
  if (countryPreference == null || countryPreference.length() == 0) {
    preferredCountries=null;
  }
 else {
    List<Country> localCountryList=new ArrayList<>();
    for (    String nameCode : countryPreference.split(",")) {
      Country country=Country.getCountryForNameCodeFromCustomMasterList(customMasterCountriesList,customLanguage,nameCode);
      if (country != null) {
        if (!isAlreadyInList(country,localCountryList)) {
          localCountryList.add(country);
        }
      }
    }
    if (localCountryList.size() == 0) {
      preferredCountries=null;
    }
 else {
      preferredCountries=localCountryList;
    }
  }
  if (preferredCountries != null) {
    for (    Country country : preferredCountries) {
      country.log();
    }
  }
 else {
  }
}

void refreshPreferredCountries ( ) { if ( countryPreference == null || countryPreference . length ( ) == 0 ) { preferredCountries = null ; } else { List < Country > localCountryList = new ArrayList < > ( ) ; for ( String nameCode : countryPreference . split ( "," ) ) { Country country = Country . getCountryForNameCodeFromCustomMasterList ( customMasterCountriesList , customLanguage , nameCode ) ; if ( country != null ) { if ( ! isAlreadyInList ( country , localCountryList ) ) { localCountryList . add ( country ) ; } } } if ( localCountryList . size ( ) == 0 ) { preferredCountries = null ; } else { preferredCountries = localCountryList ; } } if ( preferredCountries != null ) { for ( Country country : preferredCountries ) { country . log ( ) ; } } else { } }
this will load preferredcountries based on countrypreference
