-
Enhancement
-
Resolution: Unresolved
-
P4
-
None
-
1.4.0
-
Fix Understood
-
generic
-
generic
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)
======================================================================
- relates to
-
JDK-4348240 (coll) request for: Object TreeSet.get(int index)
-
- Open
-