public function __construct($set = self::ALPHA2)
{
$index = array_search($set, self::getAvailableSets(), true);
if (false === $index) {
throw new ComponentException(sprintf('"%s" is not a valid country set for ISO 3166-1', $set));
}
$this->set = $set;
$this->index = $index;
}