Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LC-249 - Adding states for australian locations #853

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
package com.generalbytes.batm.server.extensions;

/**
* Australia province identifiers.
* <p>
* Usage e.g.:
* CountryAustralia.AU-NSW.getProvinceName()
* CountryAustralia.valueOf("AU-NSW").getProvinceName()
*/
public enum CountryAustralia {

AU_NSW("AU-NSW", "New South Wales"),
AU_QLD("AU-QLD", "Queensland"),
AU_SA("AU-SA", "South Australia"),
AU_TAS("AU-TAS", "Tasmania"),
AU_VIC("AU-VIC", "Victoria"),
AU_WA("AU-WA", "Western Australia"),
AU_ACT("AU-ACT", "Australian Capital Territory"),
AU_NT("AU-NT", "Northern Territory");

private final String iso;

private final String provinceName;

/**
* Private constructor.
*/
CountryAustralia(String iso, String provinceName) {
this.iso = iso;
this.provinceName = provinceName;
}

/**
* ISO 3166-2 code of the province (2 digits).
*/
public String getIso() {
return iso;
}

/**
* English province/territory name officially used by the ISO 3166 Maintenance Agency (ISO 3166/MA).
*/
public String getProvinceName() {
return provinceName;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
/**
* Italy province identifiers.
* Usage e.g.:
* CountryItaly.QC.getProvinceName()
* CountryItaly.valueOf("QC").getProvinceName()
* CountryItaly.AG.getProvinceName()
* CountryItaly.valueOf("AG").getProvinceName()
*/
public enum CountryItaly {
AG("AG", "Agrigento"),
Expand Down