Skip to content

Commit

Permalink
LC-376 - New Zealand regions (#909)
Browse files Browse the repository at this point in the history
  • Loading branch information
SMaros authored May 27, 2024
1 parent e22f245 commit f3ef934
Showing 1 changed file with 54 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
package com.generalbytes.batm.server.extensions;

/**
* New Zealand regions identifiers.
* <p>
* Usage e.g.:
* CountryNewZealand.NTL.getProvinceName()
* CountryNewZealand.valueOf("NTL").getProvinceName()
*/
public enum CountryNewZealand {

NTL("NTL", "Northland"),
AUK("AUK", "Auckland"),
WKO("WKO", "Waikato"),
BOP("BOP", "Bay of Plenty"),
GIS("GIS", "Gisborne"),
HKB("HKB", "Hawke's Bay"),
TKI("TKI", "Taranaki"),
MWT("MWT", "Manawatū-Whanganui"),
WGN("WGN", "Wellington"),
TAS("TAS", "Tasman"),
NSN("NSN", "Nelson"),
MBH("MBH", "Marlborough"),
WTC("WTC", "West Coast"),
CAN("CAN", "Canterbury"),
OTA("OTA", "Otago"),
STL("STL", "Southland");

private final String iso;

private final String provinceName;

/**
* Private constructor.
*/
CountryNewZealand(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/region name officially used by the ISO 3166 Maintenance Agency (ISO 3166/MA).
*/
public String getProvinceName() {
return provinceName;
}
}

0 comments on commit f3ef934

Please sign in to comment.