Interface KcCountryService
public interface KcCountryService
-
Method Summary
Modifier and TypeMethodDescriptiongetCountry(String code) This method retrieves a country by country code.getCountryByAlternateCode(String alternateCode) This method retrieves a country by alternate country code.
-
Method Details
-
getCountry
This method retrieves a country by country code. If the country is not found null is returned. The country code cannot be blank.- Parameters:
code- the country code. cannot be blank.- Returns:
- the country or null if not found.
- Throws:
IllegalArgumentException- if the code is blank
-
getCountryByAlternateCode
This method retrieves a country by alternate country code. The alternate country code is usually a three digit code. If the country is not found null is returned. The alternate country code cannot be blank.- Parameters:
alternateCode- the alternate country code. cannot be blank.- Returns:
- the country or null if not found.
- Throws:
IllegalArgumentException- if the alternateCode is blank
-