Kotlin Override Property/Getter/Setter With Constructor Arguments

July 24, 2018
class Test(id: String) {
    var id: String = id
        get() = if (!field.isEmpty()) field else "Is Empty"
}
This work is licensed under a
Creative Commons Attribution-NonCommercial 4.0 International License.