An extension for the Java Collection Framework

Diese Seite ist auch in Deutsch verfügbar.

New: On November 30th, 2005, version 1.3.2 was released. In this version a new methode toArray() in the class BitMathIntSet was added.

As a software project at our institute, Siegfried Hodri and Sergej Schütz developed a java package representing a consistent and efficient extension to the Java Collection Framework of JDK 1.4 that adds the handling of mathematical sets (Interface MathSet), sets of sets (Interface SetOfSets) and multisets (bags) (Interface Multiset). There is also a special class for mathematical sets of integer values (BitMathIntSet). Mathematical sets implement usual mathematical functions for sets in an non-destructive way, sets of sets have sets as elements and multisets count the frequency of each element in the collection. The package can be used, except for class BitMathIntSet, with JDK 1.3. Beginning with version 1.3, the software is distributed under the GNU Lesser General Public License.

The following files are available:

To run the two test classes Comparison and TestPerfSupersets, copy these classes and the java package to the current directory and compile the test classes with the following commands:
javac -classpath mathCollection.jar
javac -classpath mathCollection.jar
Then run the tests with the following commands:
java -classpath mathCollection.jar:. Comparison
java -Xmx300M -classpath mathCollection.jar:. TestPerfSupersets
Under Windows, use a semicolon instead of the colon.

Note that the test class TestPerfSupersets needs 300 Mbytes of heap memory.

The package was included in the Java Bug Parade under Bug Id 4938537.

If you find this package useful, I would rejoice if you send me a note. Then I would inform you when next next version is released.

Dietmar Lippold,; Institut für Intelligente Systeme
Last Change: 30th November 2005