diff options
Diffstat (limited to 'android')
| -rw-r--r-- | android/src/main/kotlin/net/mullvad/mullvadvpn/model/LocationConstraint.kt | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/android/src/main/kotlin/net/mullvad/mullvadvpn/model/LocationConstraint.kt b/android/src/main/kotlin/net/mullvad/mullvadvpn/model/LocationConstraint.kt index 302a464eaf..039f10a411 100644 --- a/android/src/main/kotlin/net/mullvad/mullvadvpn/model/LocationConstraint.kt +++ b/android/src/main/kotlin/net/mullvad/mullvadvpn/model/LocationConstraint.kt @@ -1,11 +1,20 @@ package net.mullvad.mullvadvpn.model sealed class LocationConstraint(val code: Array<String>) { - class Country(var countryCode: String) : LocationConstraint(arrayOf(countryCode)) + class Country(var countryCode: String) : LocationConstraint(arrayOf(countryCode)) { + fun get0() = countryCode + } class City(var countryCode: String, var cityCode: String) : - LocationConstraint(arrayOf(countryCode, cityCode)) + LocationConstraint(arrayOf(countryCode, cityCode)) { + fun get0() = countryCode + fun get1() = cityCode + } class Hostname(var countryCode: String, var cityCode: String, var hostname: String) : - LocationConstraint(arrayOf(countryCode, cityCode, hostname)) + LocationConstraint(arrayOf(countryCode, cityCode, hostname)) { + fun get0() = countryCode + fun get1() = cityCode + fun get2() = hostname + } } |
