open class BusinessObject(
private val map: Map<String, Any?> = mutableMapOf()
) : Map<String, Any?> by map {
val id: Int? by lazy { map["id"]?.let { it as Int } }
}
open class BusinessObject(
private val map: Map<String, Any?> = mutableMapOf()
) : Map<String, Any?> by map {
val id: Int? by lazy { map["id"]?.let { it as Int } }
}
转载于:https://my.oschina.net/wower/blog/1545400