|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object anon.util.AbstractISOCodeMapper anon.util.CountryMapper
public class CountryMapper
Objects of this class store a country code and can translate it into the localised name of the corresponding country.
http://www.iso.ch/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/iso_3166-1_decoding_table.html
Field Summary | |
---|---|
private static java.lang.String[] |
COUNTRIES
|
private static java.lang.String[] |
DEFAULT_COUNTRIES
|
private static java.lang.String |
MSG_CHOOSE_COUNTRY
|
Constructor Summary | |
---|---|
CountryMapper()
Constructs an empty CountryMapper object. |
|
CountryMapper(int a_maxCountryLength)
Constructs an empty CountryMapper object. |
|
CountryMapper(java.lang.String a_ISO2CountryCode)
Constructs a new CountryMapper that uses the default Locale to translate its country code. |
|
CountryMapper(java.lang.String a_ISO2CountryCode,
int a_maxCountryLength)
Constructs a new CountryMapper that uses the default Locale to translate its country code. |
|
CountryMapper(java.lang.String a_ISO2CountryCode,
int a_maxCountryLength,
java.util.Locale a_locale)
Constructs a new CountryMapper that uses a specific Locale to translate its country code. |
|
CountryMapper(java.lang.String a_ISO2CountryCode,
java.util.Locale a_locale)
Constructs a new CountryMapper that uses a specific Locale to translate its country code. |
Method Summary | |
---|---|
protected java.lang.String |
getChooseMessage()
Returns a message that is displayed when this mapped object has an empty ISO code. |
protected java.lang.String |
getJRETransaltionOfISOCode(java.lang.String a_ISOCountryCode,
java.util.Locale a_locale)
|
static java.util.Vector |
getLocalisedCountries()
Returns a Vector with CountryMappers for all officially assigned country codes. |
static java.util.Vector |
getLocalisedCountries(int a_maxCountryLength)
Returns a Vector with CountryMappers for all officially assigned country codes. |
static java.util.Vector |
getLocalisedCountries(int a_maxCountryLength,
java.util.Locale a_loc)
Returns a Vector with CountryMappers for all officially assigned country codes. |
static java.util.Vector |
getLocalisedCountries(java.util.Locale a_loc)
Returns a Vector with CountryMappers for all officially assigned country codes. |
Methods inherited from class anon.util.AbstractISOCodeMapper |
---|
equals, getISOCode, hashCode, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final java.lang.String[] DEFAULT_COUNTRIES
private static final java.lang.String MSG_CHOOSE_COUNTRY
private static final java.lang.String[] COUNTRIES
Constructor Detail |
---|
public CountryMapper()
public CountryMapper(int a_maxCountryLength)
a_maxCountryLength
- the maximum length of the toString() outputpublic CountryMapper(java.lang.String a_ISO2CountryCode, int a_maxCountryLength) throws java.lang.IllegalArgumentException
a_ISO2CountryCode
- a two-letter country codea_maxCountryLength
- the maximum length of the toString() output
java.lang.IllegalArgumentException
getLocalisedCountries(int)
public CountryMapper(java.lang.String a_ISO2CountryCode) throws java.lang.IllegalArgumentException
a_ISO2CountryCode
- a two-letter country code
java.lang.IllegalArgumentException
getLocalisedCountries(int)
public CountryMapper(java.lang.String a_ISO2CountryCode, java.util.Locale a_locale) throws java.lang.IllegalArgumentException
a_ISO2CountryCode
- a two-letter country codea_locale
- a Locale
java.lang.IllegalArgumentException
getLocalisedCountries(int, Locale)
public CountryMapper(java.lang.String a_ISO2CountryCode, int a_maxCountryLength, java.util.Locale a_locale) throws java.lang.IllegalArgumentException
a_ISO2CountryCode
- a two-letter country codea_locale
- a Localea_maxCountryLength
- the maximum length of the toString() output
java.lang.IllegalArgumentException
getLocalisedCountries(int, Locale)
Method Detail |
---|
public static java.util.Vector getLocalisedCountries()
public static java.util.Vector getLocalisedCountries(java.util.Locale a_loc)
a_loc
- the locale that is used in all contructed CountryMappers
public static java.util.Vector getLocalisedCountries(int a_maxCountryLength)
a_maxCountryLength
- the maximum length of the toString() output
public static java.util.Vector getLocalisedCountries(int a_maxCountryLength, java.util.Locale a_loc)
a_loc
- the locale that is used in all constructed CountryMappersa_maxCountryLength
- the maximum length of the toString() output
protected final java.lang.String getChooseMessage()
AbstractISOCodeMapper
getChooseMessage
in class AbstractISOCodeMapper
protected java.lang.String getJRETransaltionOfISOCode(java.lang.String a_ISOCountryCode, java.util.Locale a_locale)
getJRETransaltionOfISOCode
in class AbstractISOCodeMapper
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |