I'm a relatively new Java programmer coming from C++/STL, and am looking for a class with these characteristics (which the C++ std::deque has, as I understand it):
- O(1) performance for insertion/removal at the beginning/end
- O(1) performance for lookup by index
- are growable collections (don't need fixed size bounds)
Is there a Java equivalent to this? I found the Java 1.6 [ArrayDeque] class which has the insert/removal and growable characteristics, but don't seem to have lookup-by-index unless you call toArray() which would not be O(1).