org.databene.domain.address
Class Country

java.lang.Object
  extended by org.databene.domain.address.Country

public class Country
extends java.lang.Object

Represents a country and provides constants for most bigger countries. Country information is read from the file org/databene/domain/address/country.csv.

Created: 11.06.2006 08:15:37

Since:
0.1
Author:
Volker Bergmann

Field Summary
static Country AFGHANISTAN
           
static Country ALBANIA
           
static Country ALGERIA
           
static Country ANDORRA
           
static Country ARGENTINA
           
static Country AUSTRALIA
           
static Country AUSTRIA
           
static Country BAHAMAS
           
static Country BAHRAIN
           
static Country BELARUS
           
static Country BELGIUM
           
static Country BOSNIA_AND_HERZEGOVINA
           
static Country BRAZIL
           
static Country BULGARIA
           
static Country CANADA
           
static Country CHILE
           
static Country CHINA
           
static Country CROATIA
           
static Country CYPRUS
           
static Country CZECH_REPUBLIC
           
static Country DENMARK
           
static Country ECUADOR
           
static Country EGYPT
           
static Country ESTONIA
           
static Country FINLAND
           
static Country FRANCE
           
static Country GERMANY
           
static Country GHANA
           
static Country GREAT_BRITAIN
           
static Country GREECE
           
static Country HUNGARY
           
static Country ICELAND
           
static Country INDIA
           
static Country INDONESIA
           
static Country IRAN
           
static Country IRAQ
           
static Country IRELAND
           
static Country ISRAEL
           
static Country ITALY
           
static Country JAPAN
           
static Country JORDAN
           
static Country KAZAKHSTAN
           
static Country KENYA
           
static Country KOREA_PR
           
static Country KOREA_R
           
static Country LATVIA
           
static Country LIECHTENSTEIN
           
static Country LITHUANIA
           
static Country LUXEMBURG
           
static Country MALAYSIA
           
static Country MALTA
           
static Country MEXICO
           
static Country MONACO
           
static Country NETHERLANDS
           
static Country NEW_ZEALAND
           
static Country NORWAY
           
static Country PAKISTAN
           
static Country POLAND
           
static Country PORTUGAL
           
static Country QATAR
           
static Country ROMANIA
           
static Country RUSSIA
           
static Country SAN_MARINO
           
static Country SAUDI_ARABIA
           
static Country SERBIA
           
static Country SINGAPORE
           
static Country SLOVAKIA
           
static Country SLOVENIA
           
static Country SOUTH_AFRICA
           
static Country SPAIN
           
static Country SWEDEN
           
static Country SWITZERLAND
           
static Country TAIWAN
           
static Country THAILAND
           
static Country TURKEY
           
static Country UKRAINE
           
static Country UNITED_ARAB_EMIRATES
           
static Country UNITED_KINGDOM
           
static Country US
           
static Country USA
           
static Country VIETNAM
           
 
Method Summary
 void addState(State state)
           
 boolean equals(java.lang.Object obj)
           
 City generateCity()
           
 PhoneNumber generateLandlineNumber()
           
 PhoneNumber generateMobileNumber()
           
 PhoneNumber generateMobileNumber(City city)
           
 PhoneNumber generatePhoneNumber()
           
 java.util.List<City> getCities()
           
static Country getDefault()
           
 java.util.Locale getDefaultLanguageLocale()
           
 java.lang.String getDisplayName()
          Returns the name in the user's Locale
static Country getFallback()
           
static Country getInstance(java.lang.String isoCode)
          Retrieves a country from the country configuration file.
static Country getInstance(java.lang.String isoCode, boolean create)
          Retrieves a country from the country configuration file.
static java.util.Collection<Country> getInstances()
           
 java.lang.String getIsoCode()
           
 java.lang.String getLocalName()
          Returns the name in the country's own Locale
 java.lang.String getName()
          Returns the English name
 java.lang.String getPhoneCode()
           
 int getPopulation()
           
 State getState(java.lang.String stateId)
           
 java.util.Collection<State> getStates()
           
 int hashCode()
           
static boolean hasInstance(java.lang.String isoCode)
           
 boolean isMobilePhoneCityRelated()
           
static void setDefault(Country country)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

GERMANY

public static final Country GERMANY

AUSTRIA

public static final Country AUSTRIA

SWITZERLAND

public static final Country SWITZERLAND

LIECHTENSTEIN

public static final Country LIECHTENSTEIN

BELGIUM

public static final Country BELGIUM

NETHERLANDS

public static final Country NETHERLANDS

LUXEMBURG

public static final Country LUXEMBURG

DENMARK

public static final Country DENMARK

FINLAND

public static final Country FINLAND

IRELAND

public static final Country IRELAND

ICELAND

public static final Country ICELAND

NORWAY

public static final Country NORWAY

SWEDEN

public static final Country SWEDEN

UNITED_KINGDOM

public static final Country UNITED_KINGDOM

GREAT_BRITAIN

public static final Country GREAT_BRITAIN

ITALY

public static final Country ITALY

SAN_MARINO

public static final Country SAN_MARINO

MALTA

public static final Country MALTA

FRANCE

public static final Country FRANCE

MONACO

public static final Country MONACO

ANDORRA

public static final Country ANDORRA

SPAIN

public static final Country SPAIN

PORTUGAL

public static final Country PORTUGAL

GREECE

public static final Country GREECE

CYPRUS

public static final Country CYPRUS

TURKEY

public static final Country TURKEY

ALBANIA

public static final Country ALBANIA

BOSNIA_AND_HERZEGOVINA

public static final Country BOSNIA_AND_HERZEGOVINA

BULGARIA

public static final Country BULGARIA

BELARUS

public static final Country BELARUS

CZECH_REPUBLIC

public static final Country CZECH_REPUBLIC

ESTONIA

public static final Country ESTONIA

CROATIA

public static final Country CROATIA

HUNGARY

public static final Country HUNGARY

LITHUANIA

public static final Country LITHUANIA

LATVIA

public static final Country LATVIA

POLAND

public static final Country POLAND

ROMANIA

public static final Country ROMANIA

RUSSIA

public static final Country RUSSIA

SERBIA

public static final Country SERBIA

SLOVENIA

public static final Country SLOVENIA

SLOVAKIA

public static final Country SLOVAKIA

UKRAINE

public static final Country UKRAINE

UNITED_ARAB_EMIRATES

public static final Country UNITED_ARAB_EMIRATES

AFGHANISTAN

public static final Country AFGHANISTAN

BAHRAIN

public static final Country BAHRAIN

ISRAEL

public static final Country ISRAEL

IRAN

public static final Country IRAN

IRAQ

public static final Country IRAQ

JORDAN

public static final Country JORDAN

KAZAKHSTAN

public static final Country KAZAKHSTAN

PAKISTAN

public static final Country PAKISTAN

QATAR

public static final Country QATAR

SAUDI_ARABIA

public static final Country SAUDI_ARABIA

ALGERIA

public static final Country ALGERIA

EGYPT

public static final Country EGYPT

GHANA

public static final Country GHANA

KENYA

public static final Country KENYA

SOUTH_AFRICA

public static final Country SOUTH_AFRICA

USA

public static final Country USA

US

public static final Country US

CANADA

public static final Country CANADA

BAHAMAS

public static final Country BAHAMAS

MEXICO

public static final Country MEXICO

ARGENTINA

public static final Country ARGENTINA

BRAZIL

public static final Country BRAZIL

CHILE

public static final Country CHILE

ECUADOR

public static final Country ECUADOR

CHINA

public static final Country CHINA

INDONESIA

public static final Country INDONESIA

INDIA

public static final Country INDIA

JAPAN

public static final Country JAPAN

KOREA_PR

public static final Country KOREA_PR

KOREA_R

public static final Country KOREA_R

MALAYSIA

public static final Country MALAYSIA

SINGAPORE

public static final Country SINGAPORE

THAILAND

public static final Country THAILAND

TAIWAN

public static final Country TAIWAN

VIETNAM

public static final Country VIETNAM

NEW_ZEALAND

public static final Country NEW_ZEALAND

AUSTRALIA

public static final Country AUSTRALIA
Method Detail

getIsoCode

public java.lang.String getIsoCode()

getName

public java.lang.String getName()
Returns the English name


getDisplayName

public java.lang.String getDisplayName()
Returns the name in the user's Locale


getLocalName

public java.lang.String getLocalName()
Returns the name in the country's own Locale


getDefaultLanguageLocale

public java.util.Locale getDefaultLanguageLocale()

getPopulation

public int getPopulation()

getPhoneCode

public java.lang.String getPhoneCode()

getState

public State getState(java.lang.String stateId)

getStates

public java.util.Collection<State> getStates()

addState

public void addState(State state)

isMobilePhoneCityRelated

public boolean isMobilePhoneCityRelated()

getCities

public java.util.List<City> getCities()

generateCity

public City generateCity()

generatePhoneNumber

public PhoneNumber generatePhoneNumber()

generateLandlineNumber

public PhoneNumber generateLandlineNumber()

generateMobileNumber

public PhoneNumber generateMobileNumber()

generateMobileNumber

public PhoneNumber generateMobileNumber(City city)

getInstances

public static java.util.Collection<Country> getInstances()

getInstance

public static Country getInstance(java.lang.String isoCode)
Retrieves a country from the country configuration file.

Parameters:
isoCode - the ISO code of the country to retrieve
Returns:
if it is a predfined country, an instance with the configured data is returned, else one with the specified ISO code and default settings, e.g. phoneCode 'UNKNOWN'.

getInstance

public static Country getInstance(java.lang.String isoCode,
                                  boolean create)
Retrieves a country from the country configuration file.

Parameters:
isoCode - the ISO code of the country to retrieve
Returns:
if it is a predfined country, an instance with the configured data is returned, else one with the specified ISO code and default settings, e.g. phoneCode 'UNKNOWN'.

hasInstance

public static boolean hasInstance(java.lang.String isoCode)

getDefault

public static Country getDefault()

setDefault

public static void setDefault(Country country)

getFallback

public static Country getFallback()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object


Copyright © 2013. All Rights Reserved.