Is there any wrapper in popular collection libraries, which implements wrapper for List<E>
so that it can be accessed both with List<E>
and SortedMap<Integer,E>
interfaces?
The goal is to have indexes shifted on insert operation and autogenerated on add operation
From what I know, both
ArrayList
andLinkedList
provide these functionalities: appending (what you meant by autogeneration on add operation) is obviously possible and indexes are shifted when you doadd(int index, E element)
.