39dd7c6f92
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 |
||
---|---|---|
data/test | ||
src | ||
.cvsignore | ||
LICENSE | ||
PROPOSAL.html | ||
README.txt | ||
RELEASE-NOTES-2.0.html | ||
STATUS.html | ||
build.properties.sample | ||
build.xml |
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