Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4472792

(coll) Add java.util.IndexedSet interface as part of collections API

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 1.4.0
    • core-libs



      Name: bsC130419 Date: 06/21/2001


      java version "1.4.0-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta-b65)
      Java HotSpot(TM) Client VM (build 1.4.0-beta-b65, interpreted mode)


      In a lot of situations there is the need for a fast random-access collection
      that is guaranteed to have no duplicate elements. For this purpose we have
      developed an IndexedSet interface in our project. It is a combination of the
      Set and List interfaces from java.util:

         public interface IndexedSet
         extends java.util.Set, java.util.List {
            // empty
         }

      We implemented an AbstractIndexedSet base class and an IndexedHashSet class,
      which is a concrete implementation.

      The advantage of an IndexedSet is that it combiness the guarantee of
      uniqueness (Set) with the access speed (List). Instead of using an Iterator to
      traverse through the elements, we can now just use the get(int) method to
      access elements.
      (Review ID: 127096)
      ======================================================================

            Unassigned Unassigned
            bstrathesunw Bill Strathearn (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: