Apache Commons Collections
Go to file
Michael Smith 39dd7c6f92 Added BucketMap, renamed to StaticBucketMap, from Avalon Excaliber. I made the
following changes to the Avalon implementation:

Changed improper short form of license to the approved long form.

Changed package from org.apache.avalon.excaliber.collections to
org.apache.commons.collections.

Altered to allow null keys and null values.

Fixed the values() method to return all values from the map.  That is, when a
particular value is mapped to from two different keys, it should be included
twice in the values() collection; however the avalon implementation was using a
Set (thus not including duplicates). The new implementation uses a list which
does not restrict duplicate elements.

Fixed the put(Object,Object) method to return null rather than the value being
put into the map when the key does not already exist in the map (per the Map
contract).

Added equals(Object) and hashCode() implementations to conform to the Map
contract.

Altered the Node inner class's hashCode() method to return the hashCode of the
Map.Entry as defined in the Map.Entry's contract.

Added an equals(Object) method to the Node inner class to conform to the
Map.Entry contract.


Things left todo:

Alter the keySet(), values(), and entrySet() methods to return collections that
are backed by the map per the Map contract.

Add a constructor that takes another Map and adds all the mappings from that
map (per the Map recommendation).

Implement a DynamicBucketMap that will allow for dynamic resizing of the
hashtable's structure such that the map will not suffer a performance penalty
when the number of elements in the map exceeds the number of buckets in the
map.

Improve the documentation to indicate the performance problems when specifying
a size that is smaller than the expected number of elements.

Other general documentation cleanup


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130736 13f79535-47bb-0310-9956-ffa450edef68
2002-06-21 06:17:45 +00:00
data/test Added a comparator that provides explicit control over comparisons with null. 2002-06-09 19:23:53 +00:00
src Added BucketMap, renamed to StaticBucketMap, from Avalon Excaliber. I made the 2002-06-21 06:17:45 +00:00
.cvsignore Update collections to the new distribution directory guidelines. 2001-04-30 18:16:02 +00:00
LICENSE added local copy of LICENSE file, in order to make build script more portable 2002-04-02 16:20:36 +00:00
PROPOSAL.html Added myself as a committer 2001-05-08 13:05:44 +00:00
README.txt more... 2001-05-04 03:00:21 +00:00
RELEASE-NOTES-2.0.html Changed PriorityQueue and BinaryHeap to allow objects that do not 2002-03-19 04:34:18 +00:00
STATUS.html added ProxyMap for collections 2.0 2002-03-15 05:41:23 +00:00
build.properties.sample added optional cvs.root property to sample properties 2002-04-02 16:31:15 +00:00
build.xml (c) 2001 - 2002 2002-05-04 12:33:01 +00:00

README.txt

Jakarta Commons Collections
===========================

Welcome to the Collections component of the Jakarta Commons
project.

This component requires the excellent Ant utility.  It can 
be found here :

  http://jakarta.apache.org/ant/

For testing the project, you will also need JUnit :

  http://www.junit.org/

To let the test process find JUnit, you may make a 
copy of the build.properties.sample file, rename to
build.properties,  and modify to reflect
the location of the junit.jar on your computer.


Once you have Ant propertly installed, and the
build.properties file correctly reflects the location
of your junit.jar, you are ready to build and test.

To compile and test the component :

$ ant test

To build a jar :

$ ant dist-jar

To build the API documentation :

$ ant doc

To build the jar and API doc at once :

$ ant dist