-
Notifications
You must be signed in to change notification settings - Fork 241
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LC-249 - Adding states and territories for Australian locations (#853)
- Loading branch information
Showing
2 changed files
with
48 additions
and
2 deletions.
There are no files selected for viewing
46 changes: 46 additions & 0 deletions
46
...xtensions_api/src/main/java/com/generalbytes/batm/server/extensions/CountryAustralia.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters