every intention to move Factory, Closure, Predicate and Transformer to
another lower-level project, possibly [lang] or [pattern]. Currently
they live in [pattern], and the Util classes in that project are far
superior to these.
PR:
Obtained from:
Submitted by:
Reviewed by:
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130779 13f79535-47bb-0310-9956-ffa450edef68
Deprecated all iterator classes in the main package released in 2.0.
Removed all iterator classes from the main package that were not
released yet.
Moved test code for iterators into new iterators subpackage.
Deleted old iterator test code in the main package.
Modified main package TestAll to invoke iterators subpackage TestAll.
PR:
Obtained from:
Submitted by:
Reviewed by:
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130777 13f79535-47bb-0310-9956-ffa450edef68
now backed by the parent collection, even in fast mode, and those
classes now pass all unit tests in fast mode. The unit tests were
altered so that they actually test the classes with setFast(true).
PR:7924
Obtained from:
Submitted by:
Reviewed by:
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130771 13f79535-47bb-0310-9956-ffa450edef68
conventions outlined in the developer's guide.
Decorators are package-protected inner classes, not part of the public
API. Existing lazy and predicated decorators were moved to
CollectionUtils, ListUtils etc. New classes SetUtils, BagUtils were
added for decorators of those types.
New bounded and fixed size decorators were added for appropriate types.
Unmodifiable and synchronized decorators were added for Buffers and
Bags.
Unit tests were added where possible. No unit tests for synchronized
collection wrappers; not sure how to implement a valid test for proper
synchronization.
Also, no unit tests for Bag decorators, because the decorator unit tests
require the TestCollection framework, which won't work with Bag since it
violates the Collection contract.
Modified Files:
src/java/org/apache/commons/collections/BufferUtils.java
src/java/org/apache/commons/collections/CollectionUtils.java
src/java/org/apache/commons/collections/ListUtils.java
src/java/org/apache/commons/collections/MapUtils.java
src/java/org/apache/commons/collections/PredicateUtils.java
src/test/org/apache/commons/collections/TestAll.java
src/test/org/apache/commons/collections/TestCollectionUtils.java
src/test/org/apache/commons/collections/TestList.java
Added Files:
src/java/org/apache/commons/collections/BagUtils.java
src/java/org/apache/commons/collections/SetUtils.java
src/test/org/apache/commons/collections/TestBoundedCollection.java
src/test/org/apache/commons/collections/TestBufferUtils.java
src/test/org/apache/commons/collections/TestListUtils.java
src/test/org/apache/commons/collections/TestMapUtils.java
src/test/org/apache/commons/collections/TestPredicatedCollection.java
src/test/org/apache/commons/collections/TestSetUtils.java
Removed Files:
src/java/org/apache/commons/collections/LazyCollections.java
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130765 13f79535-47bb-0310-9956-ffa450edef68
with decent names is generated (link to come)
o made all the projects use a LICENSE.txt file. one this doesn't wig
out windows users and the checkstyle report likes to have one to
make sure that all sources files have a license present so if they
don't it can be reported.
o using the reactor tag in its first forms to provide a mechanism
to build the entire commons (still problems with detecting
JDK 1.4) and to generate a site where the navigation is gleaned
from the project themselves and don't have to kept in sync
manually.
o added a little front-end site deployer.
PR:
Obtained from:
Submitted by:
Reviewed by:
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130751 13f79535-47bb-0310-9956-ffa450edef68
element will have to be change.
this is an example of the differences in testing patterns. The
FooBarTestCase.java used in beanutils provides a nice way to grab
on to the tests while leaving test classes out of the picture while
not having to explicitly write a TestAll running. So with the
introduction of a nice pattern that is used in Bean utils you don't
need a runner and test classes will be ommitted and you can just add
test cases and go, no need to modify anything else.
PR:
Obtained from:
Submitted by:
Reviewed by:
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130749 13f79535-47bb-0310-9956-ffa450edef68
BoundedFifoBuffer is renamed from Avalon's FixedSizeBuffer. Made it extend
AbstractCollection, provided an iterator. Removed "final" from class and method
declarations. Added javadoc.
UnboundedFifoBuffer is renamed from Avalon's VariableSizeBuffer. Made it extend
AbstractCollection, provided an iterator. Removed "final" from class and method
delcarations. Added javadoc.
BufferUtils provides Buffer decorators for synchronized, unmodifiable, and
predicated Buffers.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130740 13f79535-47bb-0310-9956-ffa450edef68
Modified the interface from Avalon so that it (a) defines a read-only get()
method and (b) extends java.util.Collection. Also altered the documentation so
that the scope of the interface is broader; it can apply to stacks, heaps and
LRU caches as well.
Submitted by: Paul Jack ( pjack at sfaf dot org )
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130738 13f79535-47bb-0310-9956-ffa450edef68
Submitted by: Stephen Colebourne
I made a few minor modifications (e.g. adding </li> tags), along with modifying
the requirement of static inner classes for the decorators to be more in line
with my perception of consensus from the discussion.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130737 13f79535-47bb-0310-9956-ffa450edef68
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
so the full suite of List tests is performed on them.
Used BulkTest.makeSuite to pick up the sublist tests.
There should probably be additional work for testing the
primitive operations.
Submitted by: Paul Jack ( pjack at sfaf dot org )
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130735 13f79535-47bb-0310-9956-ffa450edef68