332 Commits

Author SHA1 Message Date
Stephen Kestle
d6f637fbf9 Added explicit dir="${basedir}" property to the junit task to ensure that <ant> tasks referencing this build.xml from another directory will still load up the relative path test data correctly.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/branches/collections_jdk5_branch@557489 13f79535-47bb-0310-9956-ffa450edef68
2007-07-19 04:43:23 +00:00
Stephen Kestle
54739bcf92 Skipped failing SerializedCanonicalTests. Marked code to be revisited through collections re-work.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/branches/collections_jdk5_branch@557435 13f79535-47bb-0310-9956-ffa450edef68
2007-07-19 00:35:50 +00:00
Stephen Kestle
5494aacffb Added junit4 and easymock to the project
Issue: COLLECTIONS-247

git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/branches/collections_jdk5_branch@555930 13f79535-47bb-0310-9956-ffa450edef68
2007-07-13 10:54:00 +00:00
Stephen Kestle
bd9bab2099 Added Edwin Tellman's patch for COLLECTIONS-243.
It all seems pretty reasonable, and it should all be checked again as the project is worked through

git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/branches/collections_jdk5_branch@555925 13f79535-47bb-0310-9956-ffa450edef68
2007-07-13 10:39:24 +00:00
Stephen Colebourne
85b3f4faa4 Generify CompositeCollection
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/branches/collections_jdk5_branch@471580 13f79535-47bb-0310-9956-ffa450edef68
2006-11-06 00:22:53 +00:00
Stephen Colebourne
898be70eaa Generify, remove getBuffer() - use covariant decorated()
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/branches/collections_jdk5_branch@471579 13f79535-47bb-0310-9956-ffa450edef68
2006-11-06 00:14:58 +00:00
Stephen Colebourne
52674fa23d Generify
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/branches/collections_jdk5_branch@471578 13f79535-47bb-0310-9956-ffa450edef68
2006-11-06 00:11:13 +00:00
Stephen Colebourne
8eab22e729 Generify and remove AbstractSerializableCollectionDecorator
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/branches/collections_jdk5_branch@471575 13f79535-47bb-0310-9956-ffa450edef68
2006-11-05 23:58:08 +00:00
Stephen Colebourne
937e261e65 Generify
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/branches/collections_jdk5_branch@471498 13f79535-47bb-0310-9956-ffa450edef68
2006-11-05 19:24:09 +00:00
Stephen Colebourne
9b78600daa Generify
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/branches/collections_jdk5_branch@471214 13f79535-47bb-0310-9956-ffa450edef68
2006-11-04 15:21:01 +00:00
Stephen Colebourne
d855890756 Whitespace change
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/branches/collections_jdk5_branch@471203 13f79535-47bb-0310-9956-ffa450edef68
2006-11-04 14:28:02 +00:00
Stephen Colebourne
f2ae841af6 Remove getCollection() - use covariant decorated()
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/branches/collections_jdk5_branch@471202 13f79535-47bb-0310-9956-ffa450edef68
2006-11-04 14:21:44 +00:00
Stephen Colebourne
6b1e3197b5 Remove getBag() - use covariant decorated()
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/branches/collections_jdk5_branch@471201 13f79535-47bb-0310-9956-ffa450edef68
2006-11-04 14:17:26 +00:00
Stephen Colebourne
5212b14250 Remove getList() - use decorated()
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/branches/collections_jdk5_branch@471192 13f79535-47bb-0310-9956-ffa450edef68
2006-11-04 14:04:46 +00:00
Stephen Colebourne
0992eec7a2 Remove getMap(), getOrderedMap() and getSortedMap() - use decorated()
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/branches/collections_jdk5_branch@471189 13f79535-47bb-0310-9956-ffa450edef68
2006-11-04 13:57:57 +00:00
Stephen Colebourne
f38f7bfd62 Remove getSet() and getSortedSet() - use decorated()
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/branches/collections_jdk5_branch@471186 13f79535-47bb-0310-9956-ffa450edef68
2006-11-04 13:47:51 +00:00
Stephen Colebourne
21c47cc136 Abstract*Decorator - Generify and use covariant return types
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/branches/collections_jdk5_branch@471180 13f79535-47bb-0310-9956-ffa450edef68
2006-11-04 13:27:44 +00:00
Stephen Colebourne
6677c85986 Abstract*Decorator - Generify and use covariant return types
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/branches/collections_jdk5_branch@471173 13f79535-47bb-0310-9956-ffa450edef68
2006-11-04 12:07:39 +00:00
Stephen Colebourne
88cbfb7236 Removed Typed* containers such as TypedList and TypedMap as generics now provides type safety
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/branches/collections_jdk5_branch@471166 13f79535-47bb-0310-9956-ffa450edef68
2006-11-04 11:33:22 +00:00
Stephen Colebourne
dacbc93ded Remove FastArrayList, FastHashMap, FastTreeMap
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/branches/collections_jdk5_branch@471163 13f79535-47bb-0310-9956-ffa450edef68
2006-11-04 10:56:39 +00:00
Stephen Colebourne
cda4ce8d78 Convert to generics
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/branches/collections_jdk5_branch@468709 13f79535-47bb-0310-9956-ffa450edef68
2006-10-28 17:49:04 +00:00
Stephen Colebourne
ad8a09a5e3 COLLECTIONS-229 - Remove deprecated classes and code
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/branches/collections_jdk5_branch@468690 13f79535-47bb-0310-9956-ffa450edef68
2006-10-28 13:03:11 +00:00
Stephen Colebourne
efd41aff47 COLLECTIONS-229 - Remove deprecated classes and code
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/branches/collections_jdk5_branch@468687 13f79535-47bb-0310-9956-ffa450edef68
2006-10-28 12:53:28 +00:00
Stephen Colebourne
c5a502a084 COLLECTIONS-228 - MultiValueMap put and putAll do not return the correct values
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/branches/collections_jdk5_branch@468685 13f79535-47bb-0310-9956-ffa450edef68
2006-10-28 12:30:27 +00:00
Stephen Colebourne
c440b250f2 Switch to new ASF licence format with copyright dates in NOTICE.txt
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/branches/collections_jdk5_branch@468603 13f79535-47bb-0310-9956-ffa450edef68
2006-10-28 00:52:37 +00:00
Stephen Colebourne
58e2c7f9e8 Switch to new ASF licence format with copyright dates in NOTICE.txt
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/branches/collections_jdk5_branch@468599 13f79535-47bb-0310-9956-ffa450edef68
2006-10-28 00:37:31 +00:00
Kristopher J. Nuttycombe
4cbed97e05 Created branch for jdk5/generics development
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/branches/collections_jdk5_branch@468106 13f79535-47bb-0310-9956-ffa450edef68
2006-10-26 19:52:36 +00:00
Kristopher J. Nuttycombe
decf5c8da9 Tagged current head prior to creation of JDK5 branch
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/tags/PRE_GENERICS@468105 13f79535-47bb-0310-9956-ffa450edef68
2006-10-26 19:50:40 +00:00
Costin Manolache
b73b147176 Fix the name - the file in CVS is called LICENCE.txt.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130753 13f79535-47bb-0310-9956-ffa450edef68
2002-07-25 18:08:05 +00:00
Jason van Zyl
26712251ba o getting the tests to work by removing the last non-testcase class.
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130752 13f79535-47bb-0310-9956-ffa450edef68
2002-07-25 03:18:04 +00:00
Jason van Zyl
4ebf207d4d o cleaning up the maven descriptors for the projects so that a site
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
2002-07-25 02:36:45 +00:00
Jason van Zyl
87341f1984 o excluding all non-testcases so that the tests pass
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130750 13f79535-47bb-0310-9956-ffa450edef68
2002-07-24 06:09:19 +00:00
Jason van Zyl
62a4ae05ab o adding project.xml and maven.xml. these don't work yet as the <build/>
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
2002-07-23 16:41:11 +00:00
Michael Smith
693659db99 Add documentation indicating that the Bag interface violates the Collection
interface.

Submitted by: Paul Jack


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130748 13f79535-47bb-0310-9956-ffa450edef68
2002-07-19 01:15:01 +00:00
Rodney Waldhoff
2d1bbdb5aa add no-arg constructor
fix method name
add some javadoc comments


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130747 13f79535-47bb-0310-9956-ffa450edef68
2002-07-10 14:06:39 +00:00
Michael Smith
84fbbbcef1 Improved class level javadoc.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130746 13f79535-47bb-0310-9956-ffa450edef68
2002-07-10 03:35:32 +00:00
Rodney Waldhoff
32487bf55b add CollatingIterator and tests
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130745 13f79535-47bb-0310-9956-ffa450edef68
2002-07-09 16:48:56 +00:00
Michael Smith
cee7a2c322 Update naming convention to be a bit more relaxed on decorator method names
(e.g. allow unmodifiableBuffer as an allowed decorator name)


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130744 13f79535-47bb-0310-9956-ffa450edef68
2002-07-03 02:34:09 +00:00
Michael Smith
5248e3fb4a Fixed javadoc links.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130743 13f79535-47bb-0310-9956-ffa450edef68
2002-07-03 02:16:48 +00:00
Michael Smith
c2307801a0 ArrayStack and BinaryHeap now implement Buffer.
Submitted by: Paul Jack


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130742 13f79535-47bb-0310-9956-ffa450edef68
2002-07-03 02:09:06 +00:00
Michael Smith
6cf2dc519e Added proper license.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130741 13f79535-47bb-0310-9956-ffa450edef68
2002-07-03 01:59:50 +00:00
Michael Smith
9f3b7f5f43 Add Buffer implementations, utilities, and tests.
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
2002-07-03 01:57:08 +00:00
Michael Smith
6f35a6f718 Fix license to approved long form.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130739 13f79535-47bb-0310-9956-ffa450edef68
2002-07-03 01:45:47 +00:00
Michael Smith
8c21747867 Added Buffer interface from Avalon Excaliber.
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
2002-07-03 01:44:04 +00:00
Michael Smith
69c5c0e07f Formalize naming conventions proposal.
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
2002-06-29 03:49:01 +00:00
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
Michael Smith
9752389b61 Made the TestCases for primitive lists extend TestList,
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
2002-06-21 04:01:31 +00:00
Michael Smith
c3a859c1ce FloatArrayList didn't implement set(int,Object) or remove(int),
essentially making it an unmodifiable List.  Since setFloat(int,float)
and removeFloatAt(int) already existed, I added trivial
implementations for set(int,Object) and remove(int).

Submitted by: Paul Jack ( pjack at sfaf dot org )


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130734 13f79535-47bb-0310-9956-ffa450edef68
2002-06-21 03:50:40 +00:00
Michael Smith
f96c2305fa Enable the bulk tests in TestArrayStack,
TestFastArrayList, TestFastArrayList1.

Submitted by:  Paul Jack ( pjack at sfaf dot org )


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130733 13f79535-47bb-0310-9956-ffa450edef68
2002-06-21 03:33:28 +00:00
Michael Smith
831f19ee73 Removed the deprecated method from TestCollection, as no one uses
it anymore.

Modified TestCursorableLinkedList so that serialization tests on
sublists and sub-sublists are ignored.

Submitted by:  Paul Jack ( pjack at sfaf dot org )


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130732 13f79535-47bb-0310-9956-ffa450edef68
2002-06-21 03:32:06 +00:00