oday
04/13/2019, 12:53 PMvar mileageValuesToYears = mapOf(
1980 to 900000,
1981 to 900000,
1982 to 100000,
1983 to 120000
)
kevinmost
04/13/2019, 5:34 PMobject Constants {
val mileageValuesToYears = ...
}
Alowaniak
04/13/2019, 10:22 PMobject MileageValueToYears : Map<Int, Int> by mapOf(
1980 to 900000
// ...
)
karelpeeters
04/13/2019, 10:24 PModay
04/14/2019, 8:24 PMStephan Schroeder
04/15/2019, 11:01 AMval
. mapOf
gives you a read-only map. So your data is immutable (or at least communicates the wish to be immutable, you could probably cast the map to a MutableMap and change stuff)