๐ฒ๐บ Java Enum: Mauritius Districts
Mauritius has 9 districts and 3 dependencies (total: 12 subdivisions), each with an official ISO 3166-2:MU code.
java
public enum MauritiusDistrict {
AGALEGA_ISLANDS("MU-AG"),
BEAU_BASSIN_ROSE_HILL("MU-BR"),
BLACK_RIVER("MU-BL"),
CUREPIPE("MU-CC"),
FLACQ("MU-FL"),
GRAND_PORT("MU-GP"),
MOKA("MU-MO"),
PAMPLEMOUSSES("MU-PA"),
PLAINE_WILHEMS("MU-PW"),
PORT_LOUIS("MU-PL"),
RODRIGUES_ISLANDS("MU-RO"),
SAVANNE("MU-SA");
private final String code;
MauritiusDistrict(String code) {
this.code = code;
}
public String getCode() {
return code;
}
}
๐๏ธ SQL Table and Insert Statements
sql
CREATE TABLE mauritius_districts (
id SERIAL PRIMARY KEY,
name VARCHAR(64) NOT NULL,
code VARCHAR(8) NOT NULL UNIQUE
);
INSERT INTO mauritius_districts (name, code) VALUES
('Agalรฉga Islands', 'MU-AG'),
('Beau Bassin-Rose Hill', 'MU-BR'),
('Black River', 'MU-BL'),
('Curepipe', 'MU-CC'),
('Flacq', 'MU-FL'),
('Grand Port', 'MU-GP'),
('Moka', 'MU-MO'),
('Pamplemousses', 'MU-PA'),
('Plaine Wilhems', 'MU-PW'),
('Port Louis', 'MU-PL'),
('Rodrigues Islands', 'MU-RO'),
('Savanne', 'MU-SA');
โ
Summary
This Java enum and SQL table use official ISO 3166-2 codes for Mauritius' 12 administrative divisions, perfect for backend systems needing consistent geographic representations.