Kevin Bourillon has released version 0.7 of the Google Collections library, which extends the standard JDK collections classes with:
- BiMap. A Map that guarantees unique values, and supports an inverse view.
- Multiset. A Collection that may contain duplicate values like a List, yet has order-independent equality like a Set. Often used to represent a histogram.
- Multimap. Similar to Map, but may contain duplicate keys. Has subtypes SetMultimap and ListMultimap providing more specific behavior.
There are also more than a dozen collection implementations, mostly of the interfaces above, but not all. ReferenceMap, for example, is a ConcurrentMap implementation which easily handles any combination of strong, soft or weak keys with strong, soft or weak values.
Static utility classes include:
- Comparators. Natural order, compound, null-friendly, ad-hoc . . .
- Iterators and Iterables. Element-based equality, cycle, concat, partition, filter with predicate, transform with function . . .
- Lists, Sets and Maps. A plethora of convenient factory methods and much more.
- PrimitiveArrays: "boxing"/"unboxing" of primitive arrays
And there's more:
- Forwarding collections
- Constrained collections
- Implementation helpers like AbstractIterator
To understand everything offered by this library, you'll have to explore the API using the "API documentation" link at the right. Or download a recent snapshot, including the binary, source, and docs, from the "Featured Downloads" section. Further information can be found using "Wiki" tab above.
Java 5 or later is required.