Class CountryCodeValidator
- java.lang.Object
-
- org.optaweb.vehiclerouting.domain.CountryCodeValidator
-
public class CountryCodeValidator extends Object
Validates ISO 3166-1 alpha-2 country codes.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<String>validate(List<String> countryCodes)Validates the list of country codes and returns a normalized copy.
-
-
-
Method Detail
-
validate
public static List<String> validate(List<String> countryCodes)
Validates the list of country codes and returns a normalized copy.- Parameters:
countryCodes- input list- Returns:
- normalized copy of the input list converted to upper case and without duplicates
- Throws:
NullPointerException- if the list isnullor if any of its elements isnullIllegalArgumentException- if any of the elements is not an ISO 3166-1 alpha-2 country code
-
-