0

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

Suzan Cioc
  • 29,281
  • 63
  • 213
  • 385

1 Answers1

0

From what I know, both ArrayList and LinkedList provide these functionalities: appending (what you meant by autogeneration on add operation) is obviously possible and indexes are shifted when you do add(int index, E element).

striving_coder
  • 798
  • 1
  • 5
  • 7