-
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-450 - Add support for Hong Kong districts (#938)
- Loading branch information
Showing
1 changed file
with
56 additions
and
0 deletions.
There are no files selected for viewing
56 changes: 56 additions & 0 deletions
56
...extensions_api/src/main/java/com/generalbytes/batm/server/extensions/CountryHongKong.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,56 @@ | ||
|
||
package com.generalbytes.batm.server.extensions; | ||
|
||
/** | ||
* Australia district identifiers. | ||
* <p> | ||
* Usage e.g.: | ||
* CountryHongKong.HCW.getProvinceName() | ||
* CountryHongKong.valueOf("HCW").getProvinceName() | ||
*/ | ||
public enum CountryHongKong { | ||
HCW("HCW", "Central and Western Hong Kong Island"), | ||
HEA("HEA", "Eastern Hong Kong Island"), | ||
HSO("HSO", "Southern Hong Kong Island"), | ||
HWC("HWC", "Wan Chai Hong Kong Island"), | ||
KKC("KKC", "Kowloon City Kowloon"), | ||
KKT("KKT", "Kwun Tong Kowloon"), | ||
KSS("KSS", "Sham Shui Po Kowloon"), | ||
KWT("KWT", "Wong Tai Sin Kowloon"), | ||
KYT("KYT", "Yau Tsim Mong Kowloon"), | ||
NIS("NIS", "Islands New Territories"), | ||
NKT("NKT", "Kwai Tsing New Territories"), | ||
NNO("NNO", "North New Territories"), | ||
NSK("NSK", "Sai Kung New Territories"), | ||
NST("NST", "Sha Tin New Territories"), | ||
NTM("NTM", "Tuen Mun New Territories"), | ||
NTP("NTP", "Tai Po New Territories"), | ||
NTW("NTW", "Tsuen Wan New Territories"), | ||
NYL("NYL", "Yuen Long New Territories"); | ||
|
||
private final String iso; | ||
|
||
private final String provinceName; | ||
|
||
/** | ||
* Private constructor. | ||
*/ | ||
CountryHongKong(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; | ||
} | ||
} |