Skip to content

Commit

Permalink
LC-249 - Adding states and territories for Australian locations (#853)
Browse files Browse the repository at this point in the history
  • Loading branch information
SMaros authored Oct 13, 2023
1 parent c73c134 commit 1d8bc8d
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 2 deletions.
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

0 comments on commit 1d8bc8d

Please sign in to comment.