|
|
Optimize with a SATA RAID Storage Solution
Range of capacities as low as $1250 per TB. Ideal if you currently rely on servers/disks/JBODs
Page 2 of 4
Another alternative, the Jakarta Commons Collections component, was released in July 2001, which extended J2SE 1.2 APIs with specialized abstract data types and new methods to test set theory. A second version was released in April 2002, adding even more specialized implementations.
Not much changed between the initial release of the Collections Framework and J2SE 1.4's release beyond the addition of a few more classes and interfaces. Support for generic types (i.e., templates) was debated with JSR (Java Specification Request) 14 but didn't make it into the J2SE 1.4 release. JSR 14 released a working prototype for generic-types support, but it is only targeted at the developer community and is unsupported (see Resources).
JSR 166 was introduced this past January. Led by Doug Lea, this is a community effort to incorporate much of the high-level
concepts in his previously mentioned util.concurrent library into the Java core libraries.
Little was heard from the folks at ObjectSpace with regard to JGL until the day before J2SE 1.4's release when a company named Recursion Software announced its acquisition of JGL and related ObjectSpace product lines. Then, in July 2002, Recursion Software released JGL 4.0, integrating JGL collections and algorithms with the standard Collections Framework.
That brings us to today. Now available are the following pieces:
Let's examine each of these and consider when you might use them.
For those unfamiliar with the Collections Framework, it offers a core set of six interfaces: Collection, Set, List, SortedSet, Map, and SortedMap.
A Collection is the base interface for sets and lists. It describes a generic group of elements with no particular characteristics. There
are no direct implementations of Collection, only sub-interface implementations.
A Set is a collection of items that do not support duplicates. There are two standard Set implementations: HashSet and TreeSet; TreeSet is sorted and also implements SortedSet.
The List interfaces are for ordered collections, offering either indexed or sequential access. List implementations include ArrayList and LinkedList; ArrayList replaces the original Vector class.
Map describes collections of key-value pairs, similar to Hashtable. Available maps are HashMap and TreeMap; TreeMap is sorted and also implements SortedMap. J2SE 1.4 introduced two new implementations: LinkedHashSet and LinkedHashMap, for maintaining insertion order while needing constant times for operations like adding, searching, and removing. Another
J2SE 1.4 implementation is IdentityHashMap, which uses == instead of equals() for equality checking operations. For those interested in weak references, yet another map, WeakHashMap, is available that uses WeakReference for the keys, therefore dropping the key-value pair if the only reference to the value is through the key.