AdministrativeLevel

Represents the administrative level of an AdministrativeUnit, using a simplified format common in countries like the USA.

Note: This simplification might not be suitable for all countries with different administrative structures.

Entries

Link copied to clipboard

Represents a city or a town.

Link copied to clipboard

Represents a county or a similar sub-administrative area.

Link copied to clipboard

Represents a state or a province.

Link copied to clipboard

Represents a country.

Properties

Link copied to clipboard
Link copied to clipboard

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

Converts the AdministrativeLevel model into the view object AdministrativeLevelViewData used to represent administrative units in the UI.

Link copied to clipboard

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.

Link copied to clipboard
fun with(administrativeUnitName: AdministrativeUnitName): String

The name of an administrative unit considering its administrativeLevel. This method is used to disambiguate some administration units that are the same name.