Index-based datastructure

Discussion in 'Java' started by Sharp, Mar 14, 2005.

  1. Sharp

    Sharp Guest

    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
     
    Sharp, Mar 14, 2005
    #1
    1. Advertising

  2. Sharp

    Chris Uppal Guest

    Sharp wrote:

    > 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
     
    Chris Uppal, Mar 14, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Anony!

    Set DataStructure

    Anony!, Aug 12, 2004, in forum: Java
    Replies:
    2
    Views:
    403
    Anony!
    Aug 13, 2004
  2. Replies:
    3
    Views:
    391
    shakah
    Jun 23, 2005
  3. Santosh

    Datastructure design

    Santosh, Nov 19, 2003, in forum: C Programming
    Replies:
    6
    Views:
    388
    pandy
    Nov 20, 2003
  4. Prateek Basu

    Datastructure and Algorithms

    Prateek Basu, Jan 23, 2004, in forum: C Programming
    Replies:
    4
    Views:
    2,215
    Prateek Basu
    Jan 24, 2004
  5. Tomasz Chmielewski

    sorting index-15, index-9, index-110 "the human way"?

    Tomasz Chmielewski, Mar 4, 2008, in forum: Perl Misc
    Replies:
    4
    Views:
    337
    Tomasz Chmielewski
    Mar 4, 2008
Loading...

Share This Page