Index-based datastructure

S

Sharp

Hi

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?

Cheers
Sharp
 
C

Chris Uppal

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top