Robert
12/29/2018, 9:12 PMLinkedList<E>
(from Java), but what Kotlin list should I extend? ArrayList
is final, so can't use that, and just List
makes me implement every method myself 😞 extending MutableList
is even worse....Dominaezzz
12/29/2018, 9:47 PMAbstractList
?Robert
12/29/2018, 11:19 PMget(index: Int)
(and for mutable list a few more). Where do I get/save those values? Just create another list in a property of it?Dominaezzz
12/29/2018, 11:28 PMAbstractCollection
for a linked list).Robert
12/29/2018, 11:32 PMget(index)
, what should I return....Dominaezzz
12/29/2018, 11:58 PMRobert
12/30/2018, 12:49 AMthis.get(index)
as that's the method I am implement, where is the data stored?Dico
12/30/2018, 1:18 AMAbstractMutableList
, it will make more sense because you'll need to implement add
and stuff.iterator
as otherwise your iterator will be extremely slow, something like O(n2/2)Robert
12/30/2018, 8:53 AMDico
12/30/2018, 8:58 AMjava.util.LinkedList
kpgalligan
12/30/2018, 6:15 PMcoletz
01/02/2019, 6:33 PM