- java.lang.Object
-
- org.meeuw.i18n.countries.CurrentCountry
-
- All Implemented Interfaces:
Serializable
,Country
,Region
public class CurrentCountry extends Object implements Country
Represents a country of which the code is one of the enum values ofCountryCode
.- Since:
- 0.1
- Author:
- Michiel Meeuwissen
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.meeuw.i18n.Region
Region.Type
-
-
Field Summary
-
Fields inherited from interface org.meeuw.i18n.countries.Country
IS_FORMER, IS_OFFICIAL, IS_USER_ASSIGNED
-
-
Constructor Summary
Constructors Constructor Description CurrentCountry(@NonNull com.neovisionaries.i18n.CountryCode code)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
String
getAlpha2()
String
getAlpha3()
com.neovisionaries.i18n.CountryCode.Assignment
getAssignment()
String
getCode()
com.neovisionaries.i18n.CountryCode
getCountryCode()
String
getName()
String
getName(@NonNull Locale locale)
ForCurrentCountry
alsocode.toLocale().getDisplayCountry(locale)
is used.int
getNumeric()
int
hashCode()
Locale
toLocale()
String
toString()
void
toStringBuilder(@NonNull StringBuilder builder, @NonNull Locale locale)
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.meeuw.i18n.Region
getLocalName, getName
-
-
-
-
Method Detail
-
getAlpha2
public String getAlpha2()
-
getAlpha3
public String getAlpha3()
-
getNumeric
public int getNumeric()
- Specified by:
getNumeric
in interfaceCountry
-
getName
public String getName(@NonNull Locale locale)
ForCurrentCountry
alsocode.toLocale().getDisplayCountry(locale)
is used.
-
getCountryCode
public com.neovisionaries.i18n.CountryCode getCountryCode()
-
toStringBuilder
public void toStringBuilder(@NonNull StringBuilder builder, @NonNull Locale locale)
- Specified by:
toStringBuilder
in interfaceRegion
-
getAssignment
public com.neovisionaries.i18n.CountryCode.Assignment getAssignment()
-
-