Sharp said:
Is it fair to say that besides Vector and primitive based arrays (int[]
etc..), the ArrayList is the only datastructure that is part of the Java
API that is index based?
Well, there's also String (and the other classes that implement CharSequence).
And don't forget that you can have arrays of objects too ;-)
One could argue that /all/ implementations of java.util.List are index-based
(depending on what you mean by that term, of course).
One could argue that java.nio.XxxxBuffer are all index-based, but you might not
necessarily want to call them "datastructures" (depending on what you mean by
that term, of course).
Implementations of javax.swing.table.TableModel are clearly index-based. I
imagine that one could find many other similar examples in the areas of
graphics and UI.
There is at least one new index-based container in J5 --
java.util.concurrent.CopyOnWriteArrayList.
And so on...
-- chris