I currently want a data structure that acts like a Deque with indexing. So, it should have O(1) addition and removal of elements at the front and back, as well as O(1) access of elements based on the index. It is not that hard to imagine a setup that would work for this.
It seems like ArrayDeque would be a natural choice for this. However, ArrayDeque does not implement List. Since the underlying data structure is an array, is there a good reason that it does not allow indexing?
Also, on a more practical note, does anyone know of any library doing the thing I want. Apache Commons does not have one as far as I can see.