@ThreadSafe @Singleton public final class CountryCache extends Object
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsCountry(Locale aCountry)
Check if the passed country is known.
|
boolean |
containsCountry(String sCountry)
Check if the passed country is known.
|
ICommonsSet<String> |
getAllCountries() |
ICommonsSet<Locale> |
getAllCountryLocales() |
Locale |
getCountry(Locale aCountry) |
Locale |
getCountry(String sCountry) |
static CountryCache |
getInstance() |
static boolean |
isInstantiated() |
void |
reinitialize()
Reset the cache to the initial state.
|
public static boolean isInstantiated()
@Nonnull public static CountryCache getInstance()
@Nonnull @ReturnsMutableCopy public ICommonsSet<String> getAllCountries()
null.@Nonnull @ReturnsMutableCopy public ICommonsSet<Locale> getAllCountryLocales()
null.public boolean containsCountry(@Nullable Locale aCountry)
aCountry - The country to check. May be null.true if the passed country is contained,
false otherwise.public boolean containsCountry(@Nullable String sCountry)
sCountry - The country to check. May be null.true if the passed country is contained,
false otherwise.public void reinitialize()
Copyright © 2014–2017 Philip Helger. All rights reserved.