throw new IllegalArgumentException("The Locale argument cannot be null");
}
// TODO: This may cause concurrent modification exceptions
Iterator itr = iterator();
Description fallBack = null;
while (itr.hasNext())
{
Description desc = (Description) itr.next();
if (desc.getLocale().equals(arg0))
{
return desc;
}
// set fall back if we have a Locale that only has
// language set.
if (desc.getLocale().getLanguage().equals(arg0.getLanguage()))
{
fallBack = desc;
}
}
return fallBack;