From 1d8bc8df97f448ff1f82f37cc8a82e3e1dbf7b93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maro=C5=A1=20Silady?= <38668012+SMaros@users.noreply.github.com> Date: Fri, 13 Oct 2023 16:40:26 +0200 Subject: [PATCH] LC-249 - Adding states and territories for Australian locations (#853) --- .../server/extensions/CountryAustralia.java | 46 +++++++++++++++++++ .../batm/server/extensions/CountryItaly.java | 4 +- 2 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/CountryAustralia.java diff --git a/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/CountryAustralia.java b/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/CountryAustralia.java new file mode 100644 index 000000000..cd410361a --- /dev/null +++ b/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/CountryAustralia.java @@ -0,0 +1,46 @@ +package com.generalbytes.batm.server.extensions; + +/** + * Australia province identifiers. + *
+ * 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; + } +} diff --git a/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/CountryItaly.java b/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/CountryItaly.java index 49e313ed9..7659b0b20 100644 --- a/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/CountryItaly.java +++ b/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/CountryItaly.java @@ -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"),