I can't understand What different there are between MutableMap and Map in Kotlin?
The following code is from a sample on https://github.com/antoniolg/Kotlin-for-Android-Developers/blob/master/app/src/main/java/com/antonioleiva/weatherapp/data/db/DbClasses.kt
I don't know why val map is designed as MutableMap, I think it should be Map because it's field of database table.
Could you tell me why var map is designed as MutableMap ?
class CityForecast(val map: MutableMap<String, Any?>, val dailyForecast: List<DayForecast>) {
var _id: Long by map
var city: String by map
var country: String by map
constructor(id: Long, city: String, country: String, dailyForecast: List<DayForecast>)
: this(HashMap(), dailyForecast) {
this._id = id
this.city = city
this.country = country
}
}