Join Slack
Powered by
Is there a way to expose a property as List outsid...
# getting-started
t
teedee
04/19/2017, 2:16 PM
Is there a way to expose a property as List outside of the class but access it as MutableList inside the class?
m
miha-x64
04/19/2017, 2:20 PM
Copy code
private val _list: MutableList<X> = mutableListOf() val list: List<T> get() = _list
t
teedee
04/19/2017, 2:27 PM
A little bit ugly but I guess there's no other way. Thanks!
6
Views
Open in Slack
Previous
Next