I know this is basic but I can't find any shortcut to do this other than building a new arraylist and inserting them.
collection.map{ x -> x.title). ?
I know this is basic but I can't find any shortcut to do this other than building a new arraylist and inserting them.
collection.map{ x -> x.title). ?
ArrayList(whatever_collection)
use collection.toMutableList() extension function.
Actually toMutableList is not guaranteed to provide an arraylist.