|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmodel.Country
public class Country
Country objects are used to store the nationality of the player and the default country of the tournament.
Nested Class Summary | |
---|---|
(package private) static class |
Country.CountryComparator
Inner class CountryComparator is used to enable sorting Country objects by their country names. |
Field Summary | |
---|---|
private java.lang.String |
code
|
private static Country[] |
country_list
|
private static java.util.HashMap<java.lang.String,Country> |
country_map
|
private java.lang.String |
name
|
Constructor Summary | |
---|---|
protected |
Country(java.lang.String countrycode,
java.lang.String countryname)
Constructor creates a Country object with a country code and matching country name. |
Method Summary | |
---|---|
java.lang.String |
getCode()
Returns country code. |
static Country[] |
getCountryList()
Returns a list of countries. |
java.lang.String |
getName()
Returns country name. |
static Country |
getUnknownCountry()
Method returns the default country that is used to set the country field in an EntryInitializer object by default. |
static Country |
parseCountryByCode(java.lang.String country_code)
Returns corresponding country name from a given country code. |
java.lang.String |
toString()
Returns country code in a string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private final transient java.lang.String code
private final transient java.lang.String name
private static java.util.HashMap<java.lang.String,Country> country_map
private static Country[] country_list
Constructor Detail |
---|
protected Country(java.lang.String countrycode, java.lang.String countryname)
countrycode
- two letter country codecountryname
- country nameMethod Detail |
---|
public java.lang.String getCode()
public java.lang.String getName()
public static Country parseCountryByCode(java.lang.String country_code) throws GoException
country_code
- country code
GoException
public static Country[] getCountryList()
public final java.lang.String toString()
toString
in class java.lang.Object
public static Country getUnknownCountry() throws GoException
GoException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |