PCJ
Home PageCategories: Languages
Latest version: 1.2
Added 2005-04-19
Primitive Collections for Java (PCJ) is a set of collection classes for primitive data types in Java. The goal is to provide an efficient alternative to the Java Collections Framework (JCF) when using primitive data types, such as int, boolean, or double. Some of its main features are:
* Interface hierarchy for all primitive types. PCJ provides symmetrical interface hierarchy for each of the primitive Java data types: boolean, char, byte, short, int, long, float, and double. Each hierarchy includes interfaces for general collections, sets, lists, and maps. To increase the learning rate and make adaptions easier to implement, each hierarchy resembles the interfaces of JCF as close as possible.
* Full interoperability with JCF classes. Each of the main collection interfaces is accompanied by adapters to and from the corresponding JCF collections. Adaption is made convenient by factory methods in the Adapter class.
* Specialized implementations. While JCF and many of the classes in PCJ perform well in the general case, much can be saved by choosing a more specialized and restricted implementation. PCJ provides a number of such classes, including range based sets (see for example CharRangeSet) and bit array based sets (see for example IntBitSet).
Built for Java |
Library |
Free or free version available |
Source code provided |