Commit Graph

2773 Commits

Author SHA1 Message Date
Stephen Colebourne 5578341679 Add reference to IteratorUtils
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130789 13f79535-47bb-0310-9956-ffa450edef68
2002-08-17 12:06:20 +00:00
Stephen Colebourne 8e2ad0efd5 Test SingletonListIterator
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130787 13f79535-47bb-0310-9956-ffa450edef68
2002-08-17 11:39:16 +00:00
Stephen Colebourne 702882dd76 Initial checkin
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130786 13f79535-47bb-0310-9956-ffa450edef68
2002-08-17 11:38:53 +00:00
Stephen Colebourne babbe098f8 Deprecate getIterator
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130785 13f79535-47bb-0310-9956-ffa450edef68
2002-08-17 11:38:35 +00:00
Stephen Colebourne ed1a9d333d Added extra null validation
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130784 13f79535-47bb-0310-9956-ffa450edef68
2002-08-17 11:33:09 +00:00
Stephen Colebourne cb996e1b98 Javadoc changes
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130783 13f79535-47bb-0310-9956-ffa450edef68
2002-08-17 11:29:38 +00:00
Stephen Colebourne 18c63e1eff Remove List constructor
Added three new constructors
Added get for iterator list
Added extra null validation


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130782 13f79535-47bb-0310-9956-ffa450edef68
2002-08-17 11:28:36 +00:00
Stephen Colebourne 14603b3c26 Added two new constructors
Added set and get for iterator list
Added extra null validation


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130781 13f79535-47bb-0310-9956-ffa450edef68
2002-08-17 11:24:58 +00:00
pjack 21b77034c4 Removing these because we'd only deprecate them later. There is
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
2002-08-16 00:02:41 +00:00
pjack 82a5501d1c Edited package.html files to include recent stuff.
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130778 13f79535-47bb-0310-9956-ffa450edef68
2002-08-16 00:00:23 +00:00
pjack f26c68bf7b Moved all iterators to new iterators subpackage.
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
2002-08-15 23:13:52 +00:00
pjack fceaa29c48 Renamed Factory.createObject() to Factory.create().
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130776 13f79535-47bb-0310-9956-ffa450edef68
2002-08-15 20:09:38 +00:00
pjack 8ab071ff5d Documented (almost) all public/protected members.
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130775 13f79535-47bb-0310-9956-ffa450edef68
2002-08-15 20:04:31 +00:00
pjack 8d61930eab Enabled full suite of TestMap tests, and activated checks to see that
collection views are backed by map etc.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130774 13f79535-47bb-0310-9956-ffa450edef68
2002-08-15 03:23:08 +00:00
pjack 869725582c 1. Collection views are now backed by map.
2.  Used bit-mixing hash function.
3.  Added docs about the non-atomic nature of bulk operations.
4.  Improved performance of size() operation.
5.  Added atomic(Runnable) method.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130773 13f79535-47bb-0310-9956-ffa450edef68
2002-08-15 03:22:29 +00:00
pjack 43c829d318 Added documentation to classes in primitives package.
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130772 13f79535-47bb-0310-9956-ffa450edef68
2002-08-13 19:41:36 +00:00
pjack 642cb02b25 The collection views of FastArrayList, FastTreeMap and FastHashMap are
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
2002-08-13 04:34:09 +00:00
pjack 7230a4e5ea Renamed SimpleObjectFactory to Factory.
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130770 13f79535-47bb-0310-9956-ffa450edef68
2002-08-13 01:19:00 +00:00
pjack a5e5273b8d Added package.html for comparators and primitives subpackages.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130769 13f79535-47bb-0310-9956-ffa450edef68
2002-08-13 01:05:21 +00:00
pjack d3f3a8aa3d Fixed some JavaDoc errors.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130768 13f79535-47bb-0310-9956-ffa450edef68
2002-08-13 01:04:19 +00:00
pjack 6b7155d174 Forgot the license AGAIN. <slap>
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130767 13f79535-47bb-0310-9956-ffa450edef68
2002-08-13 00:49:59 +00:00
pjack 8191cf918f Added @since tags to files that were missing them. Also added some
@version tags to files that were missing them.  Also added private
constructor to ComparatorUtils.
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130766 13f79535-47bb-0310-9956-ffa450edef68
2002-08-13 00:46:25 +00:00
pjack e18f4e691a Added new decorators, and modified existing decorators to fit the
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
2002-08-13 00:26:52 +00:00
pjack 6043494121 Fixed infinite recursion in equals(Object) method.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130764 13f79535-47bb-0310-9956-ffa450edef68
2002-08-12 22:51:13 +00:00
pjack dcbca14341 Added serialVersionUid for compatibility...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130763 13f79535-47bb-0310-9956-ffa450edef68
2002-08-12 19:59:49 +00:00
pjack 5462527ed3 Deprecated SoftRefHashMap.
PR:9571
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130762 13f79535-47bb-0310-9956-ffa450edef68
2002-08-12 18:24:33 +00:00
pjack 19538d0671 Forgot the license. Heh. Ahem.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130761 13f79535-47bb-0310-9956-ffa450edef68
2002-08-12 18:16:05 +00:00
pjack 81f6b79a48 Added new ReferenceMap class.
PR:9571
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130760 13f79535-47bb-0310-9956-ffa450edef68
2002-08-12 18:13:09 +00:00
pjack 7e650946d4 Some unit tests were failing under JDK1.2.2, because of bugs in the
source for JDK1.2.2 TreeMap and HashMap (they incorrectly return false
when a null value is removed from the collection views).


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130758 13f79535-47bb-0310-9956-ffa450edef68
2002-08-12 18:00:46 +00:00
pjack 9adb578a23 Added BeanMap.putAllWriteable(BeanMap) method, and unit test.
PR:11262


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130756 13f79535-47bb-0310-9956-ffa450edef68
2002-08-10 02:05:20 +00:00
pjack 560c096309 Added documentation that clearly indicates that these classes will not
work reliably on some architectures.

PR:9206


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130755 13f79535-47bb-0310-9956-ffa450edef68
2002-08-10 00:49:45 +00:00
pjack df79bf3af4 PR:10168
Submitted by:Maarten Coene (MacBelgium at toughguy dot net)


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130754 13f79535-47bb-0310-9956-ffa450edef68
2002-08-10 00:36:34 +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 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 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
Michael Smith 5b3f6003c5 TestList tests have been rewritten to conform to the general
TestCollection patterns.  A bulk test has been included for
sublists and sub-sublists.

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@130731 13f79535-47bb-0310-9956-ffa450edef68
2002-06-21 03:28:54 +00:00
Michael Smith 4ab1ffccbe The indexOf(Object) and lastIndexOf(Object) were incorrectly
raising a NullPointerException if null were passed as the argument.
This patch file fixes the behavior so that these methods will
correctly find a null element.

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


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130730 13f79535-47bb-0310-9956-ffa450edef68
2002-06-21 03:26:15 +00:00
Henri Yandell f405dbaea6 Added a start and end index to the ArrayIterator. Unit tests also added and
currently passing.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130729 13f79535-47bb-0310-9956-ffa450edef68
2002-06-20 02:51:18 +00:00
Michael Smith 486972dbc7 Remove use of TestHashMap which didn't really test anything that isn't
already tested in TestMap.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130728 13f79535-47bb-0310-9956-ffa450edef68
2002-06-18 05:41:11 +00:00
Michael Smith 02c0d12fca Enabled the new test framework in the following test classes:
- TestBeanMap
 - TestCursorableLinkedList
 - TestDoubleOrderedMap
 - TestFastHashMap
 - TestFastHashMap1
 - TestFastTreeMap
 - TestFastTreeMap1
 - TestLRUMap
 - TestSequencedHashMap
 - TestSoftRefHashMap

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

Note: TestAll does not contain reference to TestSoftRefHashMap, so this test is
not automatically run.  If you run it manually, you will see many failures that
are due to bug 9571.

Note: With this commit, there are four test failures if you are running with
JDK 1.2.  This is due to a bug in the JDK's implementation of keySet on a
HashMap which incorrectly returns false after removing a mapping which maps a
key to a null value.  Incidently, this problem is very similar to the problem
that existed on SequencedHashMap, filed as bug 9719, and fixed on June 9th.
See: http://developer.java.sun.com/developer/bugParade/bugs/4286765.html


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130727 13f79535-47bb-0310-9956-ffa450edef68
2002-06-18 05:35:58 +00:00
Michael Smith 326f500bb3 Modified tests that used makeEmptyMap and makeFullMap to use the map field
along with resetEmpty() and resetFull().  This allows for more calls to verify
to ensure that calls to methods that should not modify a collection don't
actually modify it.

Split the verify() method into four separate verification methods.  This way,
if a Map implementation needs to change the way verification is performed for
just one of the collection views, they only need to override one method and
won't need to reimplement all the other verifications.

Override TestMultiHashMap's verifyValues() method to retrieve a fresh copy of
the values collection before verification.  This ensures some verification
testing on the values, even though the values is not backed by the map (bug
9573)

Override a few more test methods and the verifyyMap and verifyEntrySet methods
for TestMultiHashMap since it's values are collections rather than the expected
objects.  These will need to be filled in with better implementations to
actually test the MultiMap contact.

Removed the SupportsPut marker interface.

Removed some duplicate tests (i.e. some old tests that weren't written with the
current framework in mind and just duplicate the tests that have been added).


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130726 13f79535-47bb-0310-9956-ffa450edef68
2002-06-18 03:28:35 +00:00
Michael Smith be0b62cfc3 Enhanced TestMap to more completely test the Map contract.
Submitted by: Paul Jack ( pjack at sfaf dot org ).

Needed to change Paul's implementation slightly to get things compile properly
using JDK 1.2.  The 1.2 compiler thought that the "confirmed" field was
ambiguous in the anonymous inner class and thus needed to be qualified with a
ClassName.this.  In order to do that, the anonymous inner classes needed to be
made named inner classes.

This change exposes one test failure for MultiHashMap that appears to be caused
by its values() method not being backed by the map (bug 9573).


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130725 13f79535-47bb-0310-9956-ffa450edef68
2002-06-18 03:17:34 +00:00
Michael Smith 6b825d40c2 Made the makeCollection and makeFullCollection methods final since set tests
should use makeEmptySet and makeFullSet rather than their collection
counterparts.

Added getSet() and getConfirmedSet() methods which wrap the collection and
confirmed fixtures so that tests don't need to perform the cast to a Set.

Modified tests that used makeEmptySet and makeFullSet to use the fixture
getSet() along with resetEmpty() and resetFull().  This allows for more calls
to verify() to ensure that calls to methods that should not modify a
collection don't actually modify it.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130724 13f79535-47bb-0310-9956-ffa450edef68
2002-06-18 03:06:45 +00:00
Michael Smith 45b1116ed9 Added new TestSet class, extending the TestCollection class to test the
complete Set contract.  This will be used to test Set implementations and set
views of other collections (e.g. Map.entrySet() and Map.keySet()).

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


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130723 13f79535-47bb-0310-9956-ffa450edef68
2002-06-18 02:58:28 +00:00
Michael Smith 10e245918f Renamed supportsAdd and supportsRemove to isAddSupported and isRemoveSupported.
Removed commented out tests for equals and hashCode (the collection contract
does not specify a specific contract on equals and hashCode), and added a
comment at the top of the class so that no one comes in later and re-adds the
test cases.

Removed dependence on HashBag.  If HashBag has a bug, this may adversly affect
the tests that are using it.  Reimplemented without using HashBag.

Modified tests that used makeFullCollection and makeCollection to use the
fixture field "collection" along with resetEmpty() and resetFull().  This
allowed for more calls to verify to ensure that calls to methods that should
not modify a collection don't actually modify it.

When removing using the iterator, an equivalent operation cannot really be
performed on the confirmed collection for verification.  After some
investigation, changed the existing tests (tested for instances of Set, List
and Bag) to one that is a bit more generic: A new flag (that test subclasses
can override) which specifies whether the elements in the collection are
distinguishable from each other (and such that it might matter which element is
actually removed from the collection when the iterator's remove method is
called).


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130722 13f79535-47bb-0310-9956-ffa450edef68
2002-06-18 02:51:12 +00:00
Michael Smith b79307f302 Enhanced TestCollection to more completely test the Collection contract. This
will be used to test straight Collection implementations and for collection
views of other collections (e.g. Map.values()).

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

Changed TestBag to extend from TestObject instead of TestCollection since the
Bag contract conflicts with the Collection contract.  This needs to be
addressed at some point.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130721 13f79535-47bb-0310-9956-ffa450edef68
2002-06-18 01:14:23 +00:00
Michael Smith aed28e1dd2 Added framework to modularize collections tests such the testing code used for
testing collections, maps, etc., can be reused to test collections, maps,
etc. that are returned from other collections.  For example, the Map interface
defines entrySet() which is supposed to return a valid Set.  The framework
added here would allow the Set testing code to be used for testing Sets and the
set returned from Map's entrySet() method.

Submitted by: Paul Jack < pjack at sfaf dot org >


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130720 13f79535-47bb-0310-9956-ffa450edef68
2002-06-18 01:04:03 +00:00
Michael Smith d74c53cd0d Add a toString() to aid in debugging.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130719 13f79535-47bb-0310-9956-ffa450edef68
2002-06-16 18:56:19 +00:00
Michael Smith c28176cb14 Fixed javadoc warnings, most of which only appear with javadoc 1.4. I
really don't understand why javadoc likes references to inner classes in
some cases, but in others, it requires it to be fully qualified.  This
fixes all the warnings reported though.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130718 13f79535-47bb-0310-9956-ffa450edef68
2002-06-16 03:39:40 +00:00
Michael Smith e9f2bdc6a5 Fix NullPointerException in CursorableLinkedList.remove(Object) and
CursorableLinkedList.contains(Object) methods when the argument is
null.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130717 13f79535-47bb-0310-9956-ffa450edef68
2002-06-15 03:52:24 +00:00
Michael Smith 5fe503ec59 Renamed nullFirst and nullLast to nullLow and nullHigh. "First" and
"Last" don't really mean mcuh in the context of comparing two items.
Especially if you consider the comparator being used for a maximum
heap.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130716 13f79535-47bb-0310-9956-ffa450edef68
2002-06-12 04:28:22 +00:00
Michael Smith 404ad88cdc Added @since tags for classes introduced in the 1.0 and 2.0
collection releases.  I did not add @since tags to classes
added since the 2.0 release, because I'm not certain whether
the next release will be 2.1 or 3.0 or whatever.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130715 13f79535-47bb-0310-9956-ffa450edef68
2002-06-12 03:59:17 +00:00
James Strachan b8766d82a6 applied Paul Jacks' patch for a number of helper methods for working with Comparators.
This can help avoid folks having to use the o.a*.c*.collections.comparators package, providing nice simple static helper method instead along the same lines as java.util.Collections and CollectionUtils here.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130714 13f79535-47bb-0310-9956-ffa450edef68
2002-06-11 16:22:06 +00:00
Michael Smith b8dc22933b Fix email address links.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130713 13f79535-47bb-0310-9956-ffa450edef68
2002-06-11 02:41:47 +00:00
Michael Smith 8fdad7215b Add some collections that were missing from the package
documentation.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130712 13f79535-47bb-0310-9956-ffa450edef68
2002-06-11 02:40:52 +00:00
Michael Smith c8e641739a Fixed typo.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130711 13f79535-47bb-0310-9956-ffa450edef68
2002-06-10 05:33:53 +00:00
Michael Smith e02e354300 Added a comparator that provides explicit control over comparisons with null.
This can be used to create SortedSets or other sorted collections where nulls
are sorted first or last.  The basis for this comparator was this discussion on
the commons mailing list:

http://www.mail-archive.com/commons-dev%40jakarta.apache.org/msg07762.html


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130710 13f79535-47bb-0310-9956-ffa450edef68
2002-06-09 19:23:53 +00:00
Michael Smith c1cdfa611c Fix for bug 9719.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130709 13f79535-47bb-0310-9956-ffa450edef68
2002-06-09 07:14:14 +00:00
James Strachan bde0d09c4c Added Jonathan Carlson's patch for a Comparator that uses a Transformer
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130708 13f79535-47bb-0310-9956-ffa450edef68
2002-06-08 06:42:00 +00:00
Rodney Waldhoff d7f1ac38d0 add FloatArrayList and test
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130707 13f79535-47bb-0310-9956-ffa450edef68
2002-06-04 16:50:09 +00:00
Rodney Waldhoff 61cf43c0e7 add primitive collections, and tests
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130706 13f79535-47bb-0310-9956-ffa450edef68
2002-06-04 16:01:28 +00:00
Arron Claude Bates 26fbf88577 fixed List growing issue.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130705 13f79535-47bb-0310-9956-ffa450edef68
2002-05-29 03:22:42 +00:00
Arron Claude Bates 2dd5130b2c initial commit.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130704 13f79535-47bb-0310-9956-ffa450edef68
2002-05-29 02:57:41 +00:00
Michael Smith 1e22afa5b0 Added new testing code submitted by Paul Jack < pjack at sfaf dot org >
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130703 13f79535-47bb-0310-9956-ffa450edef68
2002-05-28 06:51:03 +00:00
Michael Smith 5d8832a059 Implemented equals(Object) and hashCode() as per the Map interface.
Also, added a toString() method for simpler debugging.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130702 13f79535-47bb-0310-9956-ffa450edef68
2002-05-24 04:00:30 +00:00
Rodney Waldhoff e2af015a2f fix a bug in FilterListIterator and add a test for it
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130701 13f79535-47bb-0310-9956-ffa450edef68
2002-05-13 16:10:37 +00:00
Michael Smith 6b320e8afe Fixed to have SequencedHashMap throw a ConcurrentModificationException
from its iterators if the map is modified through something other than
the iterator.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130700 13f79535-47bb-0310-9956-ffa450edef68
2002-05-09 03:20:59 +00:00
Michael Smith 09e7a4b86e Fixed to ensure that get(Object) won't add a mapping to a null value
when one didn't exist before.  That is, if containsKey(foo) returns
false, then get(foo) will not change that.

Added serial version UID to maintain backwards compatibility.  The auto
generated serialization UID differs from the released version because
of the addition of a new method.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130699 13f79535-47bb-0310-9956-ffa450edef68
2002-05-09 03:10:46 +00:00
Morgan James Delagrange 33f0ab0d46 added test for concurrent modifications
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130698 13f79535-47bb-0310-9956-ffa450edef68
2002-05-08 18:11:36 +00:00
Morgan James Delagrange a62220afa5 added test for concurrent modifications
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130697 13f79535-47bb-0310-9956-ffa450edef68
2002-05-08 17:54:28 +00:00
Morgan James Delagrange b17194ecad had to temporarily override test that causes an infinite loop
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130696 13f79535-47bb-0310-9956-ffa450edef68
2002-05-08 17:34:17 +00:00
Morgan James Delagrange 86bd2c4931 test to make sure that gets promote keys to the Most Recently Used
position


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130695 13f79535-47bb-0310-9956-ffa450edef68
2002-05-08 16:07:05 +00:00
James Strachan bccc0cbfa2 Added Stephen's new PredicateUtils submission. Looks good; just need some unit test cases ;-)
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130693 13f79535-47bb-0310-9956-ffa450edef68
2002-05-02 06:17:19 +00:00
Morgan James Delagrange f3eef9b91d fixed strage javadoc wording per patch
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130692 13f79535-47bb-0310-9956-ffa450edef68
2002-04-16 21:15:13 +00:00
Morgan James Delagrange fc2701212d new tests
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130691 13f79535-47bb-0310-9956-ffa450edef68
2002-04-10 16:33:23 +00:00
Morgan James Delagrange 1f59eea6bc A FilterIterator that skips over Objects that have already been returned
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130690 13f79535-47bb-0310-9956-ffa450edef68
2002-04-09 16:43:29 +00:00
Morgan James Delagrange 6c21eb2aa1 ListIteratorWrapper allows Iterators to simulate ListIterator behaviour
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130689 13f79535-47bb-0310-9956-ffa450edef68
2002-04-09 16:40:58 +00:00
Morgan James Delagrange 134caec9ec fixed doco bug
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130688 13f79535-47bb-0310-9956-ffa450edef68
2002-04-09 16:33:40 +00:00
Morgan James Delagrange 38e0a5c241 fixed documentation error - IteratorChain is not currently Serializable
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130687 13f79535-47bb-0310-9956-ffa450edef68
2002-04-08 23:59:58 +00:00
Morgan James Delagrange baf631663d An IteratorChain is a sequence of Iterators called until all Iterators are
exhausted


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130686 13f79535-47bb-0310-9956-ffa450edef68
2002-04-08 23:39:01 +00:00
Morgan James Delagrange cf75b03503 wrong version number in manifest
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130685 13f79535-47bb-0310-9956-ffa450edef68
2002-04-08 16:07:47 +00:00
Morgan James Delagrange 59a50d1b9b List constructors for ComparatorChain no longer perform defensive copies
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130676 13f79535-47bb-0310-9956-ffa450edef68
2002-03-25 21:20:53 +00:00
Michael Smith 80ea89fd05 Renamed AbstractBag to DefaultMapBag. The implementation is more of a
"default map based implementation" and differs in design from the
AbstractSet, AbstractMap classes which do not make assumptions about
how they might be implemented.  To be consistent with JDK AbstractX
collections, an AbstractBag class should just be providing default
implementations that could be used regardless of underlying storage
mechanism.  For example, the add(Object) method would call the abstract
add(Object,int) method passing the object and 1. Since this
implementation assumes a Map based storage for the Bag, it does not
follow the AbstractX pattern, and thus has been renamed.  There is
still room for future addition of an AbstractBag that does not assume
a storage data structure.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130675 13f79535-47bb-0310-9956-ffa450edef68
2002-03-25 05:50:57 +00:00
Michael Smith e25229d271 Updated javadoc
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130674 13f79535-47bb-0310-9956-ffa450edef68
2002-03-24 22:00:55 +00:00
Michael Smith 63cf00bf0e Made BeanMap.values() and BeanMap.keySet() unmodifiable. This brings it more
in line with the Map contract where any modifications will throw
UnsupportedOperationException rather than allow modifications that are not
reflected in the underlying map.  This also keeps values(), keySet() and
entrySet() consistent with each other.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130673 13f79535-47bb-0310-9956-ffa450edef68
2002-03-24 21:53:27 +00:00
Michael Smith 302cc6fd28 Rather than throw a NullPointerException during hasMoreElements or nextElement
when no array is passed to the constructor, treat a null to the constructor as
an empty array.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130672 13f79535-47bb-0310-9956-ffa450edef68
2002-03-24 21:50:24 +00:00
Morgan James Delagrange 6d367b97f7 javadocs
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130671 13f79535-47bb-0310-9956-ffa450edef68
2002-03-21 17:11:01 +00:00
Michael Smith 11328e166e Submitted by Daniel Rall:
"The definition of "delegate" at the beginning of the header JavaDoc is
mostly meaningless, since the class was renamed to and committed with
the name ProxyMap."


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130670 13f79535-47bb-0310-9956-ffa450edef68
2002-03-21 03:31:09 +00:00
Morgan James Delagrange 79b299a70c javadocs
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130669 13f79535-47bb-0310-9956-ffa450edef68
2002-03-20 17:09:16 +00:00
Michael Smith f62b8ed900 Fix javadoc warnings
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130668 13f79535-47bb-0310-9956-ffa450edef68
2002-03-20 05:16:24 +00:00
Michael Smith d0d74a4e1a Fix deviation from Comparator contract
[sgn(compare(x, y)) == -sgn(compare(y, x))]

Eliminate multiplication by switching order of objects passed to
underlying comparator.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130667 13f79535-47bb-0310-9956-ffa450edef68
2002-03-20 00:25:37 +00:00
Morgan James Delagrange 54c23b2da3 now throws an exception for comparisons on an empty chain and
added no-op constructor


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130665 13f79535-47bb-0310-9956-ffa450edef68
2002-03-19 22:25:58 +00:00
Michael Smith fedb457600 Fixed API to use new interfaces defined by PriorityQueue. Now supports
objects that do not implement comparable.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130664 13f79535-47bb-0310-9956-ffa450edef68
2002-03-19 13:19:13 +00:00
Michael Smith 742ffb2d8d Added static method to retrieve a shared instance.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130663 13f79535-47bb-0310-9956-ffa450edef68
2002-03-19 05:09:05 +00:00
Michael Smith ea8731a374 Fixed copyright date in license of TestBinaryHeap and added myself as an
author for BinaryHeap for my recent changes.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130662 13f79535-47bb-0310-9956-ffa450edef68
2002-03-19 04:49:00 +00:00
Michael Smith d5ca0eeb3c Changed PriorityQueue and BinaryHeap to allow objects that do not
implement Comparable.  BinaryHeap implements this by accepting an
optional Comparator in its constructor.  If no comparator is specified,
the object's natural ordering is used (i.e. it is cast to a Comparable
and compared using its compareTo method)

Also added basic tests for BinaryHeap


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130661 13f79535-47bb-0310-9956-ffa450edef68
2002-03-19 04:34:18 +00:00
Michael Smith 94a2ba779b Test for null passed to setArray in addition to passing null to the
constructor.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130660 13f79535-47bb-0310-9956-ffa450edef68
2002-03-19 01:37:40 +00:00
Michael Smith d6a2418582 Documentation updates and new test case for specifying null to the
ArrayIterator constructor or the setArray(Object) method.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130659 13f79535-47bb-0310-9956-ffa450edef68
2002-03-19 01:33:12 +00:00
Jeff Turner 67282865fa Fix javadoc warning
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130657 13f79535-47bb-0310-9956-ffa450edef68
2002-03-19 01:18:09 +00:00
Michael Smith 25e0dd13fd If object is not an array, fail on from the constructor or from
setArray rather than from hasNext or next.  This gives a more
fail-fast behavior.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130656 13f79535-47bb-0310-9956-ffa450edef68
2002-03-19 00:54:34 +00:00
Morgan James Delagrange 236ad31fbd using the setArray(Object) method no longer produces an out of bounds
exception


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130654 13f79535-47bb-0310-9956-ffa450edef68
2002-03-19 00:05:16 +00:00
Morgan James Delagrange 00be90bccc deprecated ArrayEnumeration
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130653 13f79535-47bb-0310-9956-ffa450edef68
2002-03-18 23:51:05 +00:00
Morgan James Delagrange 6c8d4b8fc7 javadoc fix
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130652 13f79535-47bb-0310-9956-ffa450edef68
2002-03-15 17:33:52 +00:00
Morgan James Delagrange 09451a1f93 fixed bad linefeeds
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130651 13f79535-47bb-0310-9956-ffa450edef68
2002-03-15 17:33:23 +00:00
Morgan James Delagrange fac6539a56 added for collections 2.0, fixed spelling of Daniel's name :)
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130647 13f79535-47bb-0310-9956-ffa450edef68
2002-03-15 05:37:21 +00:00
Morgan James Delagrange 312f353b21 added for collections 2.0
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130646 13f79535-47bb-0310-9956-ffa450edef68
2002-03-15 05:36:58 +00:00
Morgan James Delagrange a9131afbd5 removed expectation of order from iterator tests
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130645 13f79535-47bb-0310-9956-ffa450edef68
2002-03-14 18:10:33 +00:00
Morgan James Delagrange fee42d4188 fixed bad line feeds
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130644 13f79535-47bb-0310-9956-ffa450edef68
2002-03-14 18:00:51 +00:00
Michael Smith 008dc5f8da Remove incorrect comment about using hashCode to determine whether
objects in the bag are equal.

Fix numerous javadoc cross reference problems.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130642 13f79535-47bb-0310-9956-ffa450edef68
2002-03-13 06:00:20 +00:00
Michael Smith cfb9865f41 Removed bad line-endings (multiple ^Ms).
Thanks to Christopher Elkins.
see: http://www.mail-archive.com/commons-dev@jakarta.apache.org/msg04102.html


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130641 13f79535-47bb-0310-9956-ffa450edef68
2002-03-13 05:40:31 +00:00
Michael Smith 7733e2f193 Fixed typo in documentation.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130640 13f79535-47bb-0310-9956-ffa450edef68
2002-03-13 05:24:58 +00:00
Michael Smith f35291ee5c *** empty log message ***
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130639 13f79535-47bb-0310-9956-ffa450edef68
2002-03-13 04:59:03 +00:00
Michael Smith 33ac6121a5 Fixed bugs where methods failed when there is no bean set for the bean map.
Fixed entrySet() to return a set containing Map.Entry objects with readable
properties as keys.  This fixes the test case error, and a couple of the test
case failures (and uncovers a couple more test case failures)

Fixed clone method to allow subclasses to clone properly.  This requires a
non-backwards compatible change where the clone method now declares it throws
CloneNotSupportedException.  See:
http://www.javaworld.com/javaworld/jw-01-1999/jw-01-object.html Seeing how
BeanMap never directly implemented Cloneable anyway, and this is for a major
revision, I don't see this changing being much of a problem.

Since clone() declares it throws CloneNotSupportedException, that exception is
now used to indicate a problem when attempting to clone (rather than
UnsupportedOperationException, or other RuntimeException).

Added a small test for testing BeanMap clone.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130638 13f79535-47bb-0310-9956-ffa450edef68
2002-03-13 04:36:18 +00:00
Michael Smith fa43060230 Removed ^M's from file because they were causing line numbers to be
reported incorrectly when trying to track down failing test cases.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130637 13f79535-47bb-0310-9956-ffa450edef68
2002-03-13 04:15:49 +00:00
Morgan James Delagrange 5155b93eb0 added complete JavaDocs, added isLocked() and size() methods, made
checkLocked() method private


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130633 13f79535-47bb-0310-9956-ffa450edef68
2002-03-04 19:18:56 +00:00
Morgan James Delagrange f247986918 changed List, BitSet constructor to perform a defensive copy into a
new List


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130632 13f79535-47bb-0310-9956-ffa450edef68
2002-03-01 23:48:59 +00:00
Morgan James Delagrange c55fe26ab9 added separate methods for setting/changing sort order on a Comparator
in the chain


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130631 13f79535-47bb-0310-9956-ffa450edef68
2002-03-01 23:40:43 +00:00
Morgan James Delagrange 21c62eb49c added tests for ComparatorChain class
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130630 13f79535-47bb-0310-9956-ffa450edef68
2002-03-01 23:31:35 +00:00
Morgan James Delagrange 8ab9293c64 renamed random sort test to more appropriate reverse sort, and
added real random sort test


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130629 13f79535-47bb-0310-9956-ffa450edef68
2002-03-01 23:30:58 +00:00
Morgan James Delagrange 5ae848724e class that allows you to chain comparators together for SQL-like
sorting...more Javadocs to come


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130628 13f79535-47bb-0310-9956-ffa450edef68
2002-03-01 23:29:24 +00:00
Morgan James Delagrange f8d081df0d added backward compatibility tests for Serialization
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130626 13f79535-47bb-0310-9956-ffa450edef68
2002-03-01 19:42:42 +00:00
Morgan James Delagrange 61445ae559 no message
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130625 13f79535-47bb-0310-9956-ffa450edef68
2002-03-01 19:39:28 +00:00
Morgan James Delagrange 520dc72714 make all Comparators Serializable
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130624 13f79535-47bb-0310-9956-ffa450edef68
2002-03-01 19:18:49 +00:00
Morgan James Delagrange 410d547028 added ReverseComparator test
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130623 13f79535-47bb-0310-9956-ffa450edef68
2002-03-01 19:06:44 +00:00
Morgan James Delagrange 663401641b javadoc clarification
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130622 13f79535-47bb-0310-9956-ffa450edef68
2002-03-01 19:00:33 +00:00
Morgan James Delagrange 28a71ba3ba javadoc clarification
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130621 13f79535-47bb-0310-9956-ffa450edef68
2002-03-01 18:58:05 +00:00
Morgan James Delagrange 0d95977a69 javadoc clarification
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130620 13f79535-47bb-0310-9956-ffa450edef68
2002-03-01 18:56:53 +00:00
Morgan James Delagrange 1311750c18 added unit tests for Comparators
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130619 13f79535-47bb-0310-9956-ffa450edef68
2002-03-01 18:36:21 +00:00
Morgan James Delagrange 468110ea08 moved back to util for further development
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130618 13f79535-47bb-0310-9956-ffa450edef68
2002-03-01 17:10:06 +00:00
Morgan James Delagrange 5e06b23d56 Seem to have consensus on removing this for now
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130617 13f79535-47bb-0310-9956-ffa450edef68
2002-02-28 23:35:53 +00:00
Morgan James Delagrange c095f1aac1 javadoc
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130616 13f79535-47bb-0310-9956-ffa450edef68
2002-02-28 18:06:39 +00:00
Morgan James Delagrange 361f3483b5 comparators moved from the commons-sandbox/util component
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130615 13f79535-47bb-0310-9956-ffa450edef68
2002-02-26 22:42:31 +00:00
Morgan James Delagrange 8d39019497 Fixed javadoc error
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130609 13f79535-47bb-0310-9956-ffa450edef68
2002-02-26 21:30:40 +00:00
Morgan James Delagrange 192f96d505 if a collection is serializable, it should have a canonical version in CVS
for compatibility testing


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130608 13f79535-47bb-0310-9956-ffa450edef68
2002-02-26 20:52:17 +00:00
Morgan James Delagrange ff7c2c630c added compatibility tests
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130604 13f79535-47bb-0310-9956-ffa450edef68
2002-02-26 18:45:46 +00:00
Morgan James Delagrange b94322904e more generic name for serialized collections
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130602 13f79535-47bb-0310-9956-ffa450edef68
2002-02-26 18:08:58 +00:00
Morgan James Delagrange 26630ea34c added simple serialization tests
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130601 13f79535-47bb-0310-9956-ffa450edef68
2002-02-26 17:32:20 +00:00
Morgan James Delagrange 4d219cfa30 fixed bug where Collections classes were erroneously running against
JVM classes instead of subclasses


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130600 13f79535-47bb-0310-9956-ffa450edef68
2002-02-26 17:31:51 +00:00
Rodney Waldhoff 224a627029 fixing bug in FilterListIterator, adding test for it
javadoc fixes to FilterListIterator


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130599 13f79535-47bb-0310-9956-ffa450edef68
2002-02-26 17:28:55 +00:00
Morgan James Delagrange 5e5a18bf2f fixed errors where makeMap() had been changed to makeEmptyMap()
in superclasses but not subclasses, causing the wrong objects to be
tested


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130587 13f79535-47bb-0310-9956-ffa450edef68
2002-02-26 00:31:32 +00:00
Morgan James Delagrange fa381f7937 made test classes that verify JDK contracts abstract, so that we will
not have to verify their serialization


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130586 13f79535-47bb-0310-9956-ffa450edef68
2002-02-26 00:21:46 +00:00
Morgan James Delagrange e01b230f25 took out test cases that ran against JDK classes directly
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130585 13f79535-47bb-0310-9956-ffa450edef68
2002-02-26 00:17:24 +00:00
Morgan James Delagrange 3c53553bb2 fixed funky line feeds and indicated that MultiHashMap is new to
Collections 2.x


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130584 13f79535-47bb-0310-9956-ffa450edef68
2002-02-26 00:13:37 +00:00
Morgan James Delagrange d5ab2edce1 changed compatibility version to a method, and had it default to the
maximum level of compatibility: version 1


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130583 13f79535-47bb-0310-9956-ffa450edef68
2002-02-26 00:08:07 +00:00
Rodney Waldhoff e238eff5de adding ProxyListIterator, FilterListIterator, and tests
removing unneeded import from ProxyIterartor, javadoc tweaks


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130582 13f79535-47bb-0310-9956-ffa450edef68
2002-02-25 23:53:20 +00:00
Morgan James Delagrange 2f293634b9 changed the makeList() method to makeEmptyList()
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130581 13f79535-47bb-0310-9956-ffa450edef68
2002-02-25 23:51:24 +00:00
Morgan James Delagrange 9e1b45941d added base class for testing iterators
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130580 13f79535-47bb-0310-9956-ffa450edef68
2002-02-25 23:37:48 +00:00
Morgan James Delagrange f592daad05 added methods to allow for iterators that can't be full, or that can't be empty
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130579 13f79535-47bb-0310-9956-ffa450edef68
2002-02-25 23:37:38 +00:00
Morgan James Delagrange d3a61e7648 added base class for testing iterators
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130578 13f79535-47bb-0310-9956-ffa450edef68
2002-02-25 23:26:43 +00:00
Morgan James Delagrange eb9884cd91 more details for hasNext() testing
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130577 13f79535-47bb-0310-9956-ffa450edef68
2002-02-25 23:26:25 +00:00
Morgan James Delagrange 230fb16d83 was missing TestFilterIterator
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130576 13f79535-47bb-0310-9956-ffa450edef68
2002-02-25 23:15:29 +00:00
Morgan James Delagrange f9c4fd7f26 added base class for testing iterators, fixed odd line feeds in TestArrayIterator2
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130575 13f79535-47bb-0310-9956-ffa450edef68
2002-02-25 22:48:52 +00:00
Morgan James Delagrange d3bc97b77e added base class for testing iterators
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130574 13f79535-47bb-0310-9956-ffa450edef68
2002-02-25 22:43:04 +00:00
Morgan James Delagrange c7ec7fa5ef changed 'String COLLECTIONS_VERSION' to 'int COLLECTIONS_MAJOR_VERSION',
separated COLLECTIONS_MAJOR_VERSION from COMPATIBILITY_VERSION


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130573 13f79535-47bb-0310-9956-ffa450edef68
2002-02-25 20:57:08 +00:00
Morgan James Delagrange 52133cc2ef description of COLLECTIONS_VERSION constant
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130572 13f79535-47bb-0310-9956-ffa450edef68
2002-02-25 18:14:57 +00:00
Henri Yandell b7713ef824 StringStack comes from Commons.Utils.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130571 13f79535-47bb-0310-9956-ffa450edef68
2002-02-23 03:52:02 +00:00
Henri Yandell 2bd797f65d Merged the Commons.Utils MapUtils in. It consisted of:
safeAddToMap method.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130570 13f79535-47bb-0310-9956-ffa450edef68
2002-02-23 03:50:23 +00:00
Morgan James Delagrange e4605e7a79 removed testExternalizable(), redundant with test in TestMap class
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130569 13f79535-47bb-0310-9956-ffa450edef68
2002-02-22 22:26:01 +00:00
Morgan James Delagrange 32bb853f40 fixed test comments
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130568 13f79535-47bb-0310-9956-ffa450edef68
2002-02-22 22:21:50 +00:00
Morgan James Delagrange dd7f71e66d canonical forms for serialized maps in Collections 2.0
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130567 13f79535-47bb-0310-9956-ffa450edef68
2002-02-22 22:01:48 +00:00
Morgan James Delagrange eaf794f2cb constant to indicate which major release we are working on
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130566 13f79535-47bb-0310-9956-ffa450edef68
2002-02-22 22:01:32 +00:00
Morgan James Delagrange 3da4cf1ead makeMap() was removed from TestMap, replaced with makeEmptyMap()
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130565 13f79535-47bb-0310-9956-ffa450edef68
2002-02-22 22:00:44 +00:00
Morgan James Delagrange 4f2ff1d666 fixed error in serialization test
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130563 13f79535-47bb-0310-9956-ffa450edef68
2002-02-22 07:13:02 +00:00
Michael Smith 94c4dca82f Fix test failure for BeanMap.clear()
Documented deviation in behavior from Map.clear()


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130562 13f79535-47bb-0310-9956-ffa450edef68
2002-02-22 07:00:30 +00:00
Morgan James Delagrange 884b3a50e0 more specific in-memory serialization tests for SequencedHashMap
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130561 13f79535-47bb-0310-9956-ffa450edef68
2002-02-22 06:25:10 +00:00
Morgan James Delagrange 93951f7a9d in-memory serialization tests
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130560 13f79535-47bb-0310-9956-ffa450edef68
2002-02-22 06:16:35 +00:00
Michael Smith 4d9246c82a Updated my email address.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130558 13f79535-47bb-0310-9956-ffa450edef68
2002-02-22 04:58:17 +00:00
Michael Smith 91e030ff08 Fixed the following Bag related problems:
- In Bag.java, the statement "If the bag contains less than i occurences,
the item item will be removed from the unique set" implies that if the bag
contains 5 occurences and i is 5, (5 is not less than 5) then the item will
not be removed from the unique set, even though there should be no more
occurances in the bag.

 - In AbstractBag.java, the documentation does not specify exactly what a
subcless needs to do to extend AbstractBag to make a concrete subclass.

 - AbstractBag.add(Object,int) has two calls to getCount(o), when only one
is necessary.  This wastes a few cycles to perform method invocations, a
map lookup, a cast, and a few comparisons.

 - The AbstractBag.equals(Object) method will incorrectly throw a
NullPointerException if a null value is passed.  The Object.equals(Object)
API specifies "For any non-null reference value x, x.equals(null) should
return false".

 - The AbstractBag.equals(Object) method will only work if the object
passed in extends AbstractMap or implements Map.  Neither of these facts
is documented, and neither is correct.  The contract for
Object.equals(Object) states: "for any reference values x and y,
x.equals(y) should return true if and only if y.equals(x) returns true. ".
Returning true when the argument is a Map is incorrect since he reverse
(the map checking to see if its equal to the bag) will most certainly be
false.  The same can be said for AbstractMap.  A subclass of AbstractMap
may add extra data to be stored within the Bag that must also be compared
for them to be equal.  The reverse comparison (specialized subclass equals
basic abstract bap) will fail.  You can read more about this in a three-
year old, but still valid java world article:
http://www.javaworld.com/javaworld/jw-01-1999/jw-01-object.html

 - if AbstractBag.remove(Object,int) is called passing in 0 as the number
to remove and specifying an object that exists in the bag, true will be
returned from the method. Per the Bag API specification, true should only
return when an object is actually removed.  Since no objects are removed,
false should be returned instead. Additionally, if a negative number is
specified, not only is the object not removed, but object(s) are *added*
(well, in the sense that it is equivalent of calling add(o, -i))

 - the uniqueSet() method returns the set of unique objects, however the
set is modifiable.  If the underlying map implementation has the set
backed by the map (as per the map contract -- so it should), then elements
can be removed from the unique set and have them removed from the
underlying map as well.  This causes consistency problems with the Bag
since _total will then be incorrect.

 - in extractList(), getCount(current) is called each time through the
inner loop, adding lots of extra overhead.  Reversing the loop (starting
at the count and going down to 0) eliminates the excess overhead.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130557 13f79535-47bb-0310-9956-ffa450edef68
2002-02-22 04:39:53 +00:00
Michael Smith 5bf5481408 Added documentation, and updating formatting of some documentation
(i.e. put "code" within <code>...</code>)

Added check for a valid capacity argument passed to constructor.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130556 13f79535-47bb-0310-9956-ffa450edef68
2002-02-22 04:16:19 +00:00
Michael Smith 6bb40f4086 Implement Externalizable in SequencedHashMap
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130555 13f79535-47bb-0310-9956-ffa450edef68
2002-02-22 03:17:40 +00:00
Michael Smith 2af7a322ef Odd how that compiled for me before my commit, but it doesn't
afterwards (for obvious reasons)


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130554 13f79535-47bb-0310-9956-ffa450edef68
2002-02-22 02:37:56 +00:00
Michael Smith ef5aa20db3 There is no backwards compatibility issue since this class is new
since collections 1.0.  Therefore, since the entire Map interface
is implemented, there's no reason to inherit from HashMap.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130553 13f79535-47bb-0310-9956-ffa450edef68
2002-02-22 02:34:59 +00:00
Michael Smith 95ccabfc7c Added a bunch of generic tests to the TestMap.java class. Also added
cooresponding changes to other tests.  These tests expose a few deviations from
the Map contract in BeanMap.  These should either be fixed, or BeanMap should be
documented to describe how it differs from the Map contract.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130552 13f79535-47bb-0310-9956-ffa450edef68
2002-02-22 02:18:50 +00:00
Morgan James Delagrange fa16599553 more detail for testEntrySetContains()
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130550 13f79535-47bb-0310-9956-ffa450edef68
2002-02-21 20:14:37 +00:00
Morgan James Delagrange 8dc203d033 unit test to reproduce a SequencedHashMap 1.3 bug
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130549 13f79535-47bb-0310-9956-ffa450edef68
2002-02-21 20:08:15 +00:00
Morgan James Delagrange 8dddc7ac42 unit test to reproduce a SequencedHashMap 1.3 bug
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130548 13f79535-47bb-0310-9956-ffa450edef68
2002-02-21 19:57:33 +00:00
Michael Smith 90646843f9 Fix a NullPointerException when an object passed to an entrySet method is not mapping found in the map. Exhibited with entrySet().remove(Object) and entrySet().contains(Object)
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130546 13f79535-47bb-0310-9956-ffa450edef68
2002-02-21 13:46:25 +00:00
Morgan James Delagrange c6be081c1d extended TestDoubleOrderedMap from TestMap
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130544 13f79535-47bb-0310-9956-ffa450edef68
2002-02-20 23:48:13 +00:00
Morgan James Delagrange 9708644399 added stub for BeanMap unit tests...definitely needs more tests
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130543 13f79535-47bb-0310-9956-ffa450edef68
2002-02-20 23:33:23 +00:00
Morgan James Delagrange 787edf0f34 moved some generic map tests up to TestMap, and implemented a marker
interface to indicate when a TestMap class can test
put(Object,Object) operations


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130542 13f79535-47bb-0310-9956-ffa450edef68
2002-02-20 22:38:46 +00:00
Morgan James Delagrange e4a9a024e7 changed superclass from TestHashMap to TestMap, in anticipation
of making SequencedHashMap a subclass of AbstractMap


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130541 13f79535-47bb-0310-9956-ffa450edef68
2002-02-20 22:17:18 +00:00
Morgan James Delagrange ce5559b6d4 added methods for testing serialization and a simple sanity check for
all serializable collections


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130540 13f79535-47bb-0310-9956-ffa450edef68
2002-02-20 21:50:16 +00:00
Morgan James Delagrange cc0da9db95 inherit all tests from SequencedHashMap
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130539 13f79535-47bb-0310-9956-ffa450edef68
2002-02-20 20:51:38 +00:00
Morgan James Delagrange 7b2312f796 made testing of SequencedHashMap subclasses easier
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130538 13f79535-47bb-0310-9956-ffa450edef68
2002-02-20 20:50:23 +00:00
Morgan James Delagrange cd6254ae22 fixed line feed problem over whole file
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130537 13f79535-47bb-0310-9956-ffa450edef68
2002-02-20 18:30:36 +00:00
Morgan James Delagrange ca6c97a99a removed unnecessary else block and fixed indenting
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130536 13f79535-47bb-0310-9956-ffa450edef68
2002-02-20 18:05:07 +00:00
Morgan James Delagrange 89417ef747 LRUMap reimplemented, based on SequencedHashMap
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130535 13f79535-47bb-0310-9956-ffa450edef68
2002-02-20 18:01:34 +00:00
Morgan James Delagrange b5b971bf9f added stub for confirming true LRU algorithm, and added test
for setMaximumSize (fails)


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130534 13f79535-47bb-0310-9956-ffa450edef68
2002-02-19 21:28:53 +00:00
Morgan James Delagrange 37bb856fff TestHashMap is no longer the superclass, in anticipation of reimplementing
LRUMap as a subclass of SequencedHashMap


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130533 13f79535-47bb-0310-9956-ffa450edef68
2002-02-19 21:17:41 +00:00
Morgan James Delagrange 3b9b229b36 complete re-implementation of SequencedHashMap submitted by
Michael Smith


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130532 13f79535-47bb-0310-9956-ffa450edef68
2002-02-18 20:34:57 +00:00
Morgan James Delagrange b688f162ac added tests to make sure "youngest" promotion recognizes null values
in all cases


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130531 13f79535-47bb-0310-9956-ffa450edef68
2002-02-15 21:08:38 +00:00
Morgan James Delagrange 1fe14f43e1 added test for inserting null values to the map
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130530 13f79535-47bb-0310-9956-ffa450edef68
2002-02-15 20:50:37 +00:00
Morgan James Delagrange 6c42be5cd0 Undo. Put is an optional operation for a Map.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130529 13f79535-47bb-0310-9956-ffa450edef68
2002-02-15 20:48:18 +00:00
Morgan James Delagrange f05739cf89 makes sure that a Map inserts null values correctly
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130528 13f79535-47bb-0310-9956-ffa450edef68
2002-02-15 20:40:14 +00:00
Morgan James Delagrange 4cf4e68603 Fixed javadocs
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130526 13f79535-47bb-0310-9956-ffa450edef68
2002-02-14 22:44:01 +00:00
Morgan James Delagrange d27ed7fcc3 added unit test to insure backward compatibility of externalized
LRUMaps


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130525 13f79535-47bb-0310-9956-ffa450edef68
2002-02-14 22:42:45 +00:00
Morgan James Delagrange c9cc92c63e LRUMap does not support concurrent access to any of its methods
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130523 13f79535-47bb-0310-9956-ffa450edef68
2002-02-14 21:24:32 +00:00
Morgan James Delagrange f22d9bce8c added contract to LRUMap - subclasses can override removeLRU()
and remove(Object) to manipulate objects on their way out of the cache


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130522 13f79535-47bb-0310-9956-ffa450edef68
2002-02-14 20:58:48 +00:00
Morgan James Delagrange 766b98572a unit tests for subclass behaviour
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130521 13f79535-47bb-0310-9956-ffa450edef68
2002-02-14 20:57:59 +00:00
Morgan James Delagrange b0a305ab05 added fully qualified package names for imports
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130520 13f79535-47bb-0310-9956-ffa450edef68
2002-02-14 20:21:49 +00:00
Morgan James Delagrange 832be0e38f added test to make sure that putAll(Map) operation obeys the maximum
Map size


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130519 13f79535-47bb-0310-9956-ffa450edef68
2002-02-13 23:55:41 +00:00
Morgan James Delagrange 02bc992242 fixed bubble sort, so that the number of elements in the bubble sort
will always equal the size of the LRUMap


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130518 13f79535-47bb-0310-9956-ffa450edef68
2002-02-13 23:07:31 +00:00
Morgan James Delagrange 5dcc5d8747 added test for map capacity, which fails right now
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130517 13f79535-47bb-0310-9956-ffa450edef68
2002-02-13 22:32:37 +00:00
Morgan James Delagrange 4733a995ff unit test for reassigning keys
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130516 13f79535-47bb-0310-9956-ffa450edef68
2002-02-13 21:49:38 +00:00
Morgan James Delagrange c5c64c02d3 fixed IndexOutOfBoundsException
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130515 13f79535-47bb-0310-9956-ffa450edef68
2002-02-13 21:03:20 +00:00
Morgan James Delagrange e71840e0bb added unit test for LRUMap.removeLRU(), which needs fixing
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130514 13f79535-47bb-0310-9956-ffa450edef68
2002-02-13 20:59:12 +00:00
James Strachan 328f30989e Patched the LRUMap so that remove() does indeed remove items from the bubble list
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130512 13f79535-47bb-0310-9956-ffa450edef68
2002-02-10 12:56:39 +00:00
James Strachan 25c1cb6b4a Updated all the licences to the full long form and ensured that the copyright notice extends to 2002. Also applied Michael Smith's patch for FilterIterator, Closure, DefaultMapEntry and LRUMap
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130511 13f79535-47bb-0310-9956-ffa450edef68
2002-02-10 08:07:42 +00:00
James Strachan 4b266ff8bc Applied patch submitted by Michael Smith that clarifies the description of the FilterIterator
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130510 13f79535-47bb-0310-9956-ffa450edef68
2002-02-01 16:27:40 +00:00
Craig R. McClanahan 6a5c4a72c6 Committed the DoubleOrderedMap class and associated unit tests (gotta love
it when the unit test source is 50% longer than the class being tested :-).
The only change I made was to use the long-form version of the Apache
license -- according to the Apache board, that is the only acceptable
approach at the moment.  Any remaining classes in commons-collections (or
elsewhere) using the short form license should be updated.

Submitted by:	Marc Johnson <marc_johnson27591@hotmail.com>


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130509 13f79535-47bb-0310-9956-ffa450edef68
2002-01-20 04:36:08 +00:00
Henri Yandell 3d6c8c5fab An empty iterator. It is immutable and always the same object instance.
Submitted by:	Christopher Elkins <chrise@scardini.com>


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130508 13f79535-47bb-0310-9956-ffa450edef68
2001-11-26 17:15:33 +00:00
James Strachan 51a5b46632 Applied patch submitted by Richard Wan that containsKey() took a String by mistake
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130507 13f79535-47bb-0310-9956-ffa450edef68
2001-11-02 14:44:35 +00:00
Henri Yandell e91adf1191 Added Jan Sorensen's Test for FilterIterator.
Submitted by:	Jan Sorensen <jan.sorensen@aragost.com>


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130506 13f79535-47bb-0310-9956-ffa450edef68
2001-10-19 20:33:01 +00:00
Henri Yandell 21500f60e7 Patch that stops next() continually returning null if hasNext is not
called in the standard way. ie)

(cf: "Juozas Baliuka" <baliuka@mwm.lt>)

while(true) {
    filterIterator.next();
}

This should eventually throw NoSuchElementException, but it returns null
forever.

Submitted by:  Jan Sorensen <jan.sorensen@aragost.com>


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130505 13f79535-47bb-0310-9956-ffa450edef68
2001-10-19 20:18:21 +00:00
Jason van Zyl d2d3f62e25 - adding a test for the ${variable} interpolation in the getString()
methods.
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130504 13f79535-47bb-0310-9956-ffa450edef68
2001-09-21 03:15:15 +00:00
Jason van Zyl 30a8d35e54 - adding ${variable} interpolation to the getString() methods. the
code was taken from the jetspeed codebase.
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130503 13f79535-47bb-0310-9956-ffa450edef68
2001-09-21 03:14:40 +00:00
James Strachan 71a401b27b Added MultiMap and MultiHashMap implementation submitted by Chris Berry together with a JUnit test case
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130502 13f79535-47bb-0310-9956-ffa450edef68
2001-09-18 10:41:39 +00:00
James Strachan 40bdd8fe80 Added Daniel Rall's SequencedHashMap patch and ported the JUnit test case over to use assertTrue() rather than assert().
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130501 13f79535-47bb-0310-9956-ffa450edef68
2001-09-17 16:43:49 +00:00
James Strachan f9f92677a9 Added Bay's helper methods to CollectionUtils
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130500 13f79535-47bb-0310-9956-ffa450edef68
2001-08-29 16:10:29 +00:00
James Strachan a10c6b0142 Added Daniel Rall's patch to support remove() from the EnuemerationIterator
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130499 13f79535-47bb-0310-9956-ffa450edef68
2001-08-29 15:48:42 +00:00
James Strachan d08fa6d71e Added Bag interface, implementations and JUnit test cases as submitted by Chuck Burdick
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130498 13f79535-47bb-0310-9956-ffa450edef68
2001-08-29 15:28:07 +00:00
James Strachan 66c451d618 Patched ArrayIterator to use java.lang.reflect.Array so that it can support arrays of primitive types such as int[]
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130497 13f79535-47bb-0310-9956-ffa450edef68
2001-08-23 12:04:40 +00:00
James Strachan 530049b41c Backed out ArrayIterator change to use reflection rather than use Object[]
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130496 13f79535-47bb-0310-9956-ffa450edef68
2001-08-23 10:50:01 +00:00
James Strachan ea64efd6dc Patched ArrayIterator so that it can work with any type of array, not just Object[] instances
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130495 13f79535-47bb-0310-9956-ffa450edef68
2001-08-23 09:05:26 +00:00
James Strachan 74abd625bc Added SingletonIterator test case to TestAll
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130494 13f79535-47bb-0310-9956-ffa450edef68
2001-08-22 10:05:38 +00:00
James Strachan 8c44a71208 Added SingletonIterator for iterating over a single value together with a JUnit test case
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130493 13f79535-47bb-0310-9956-ffa450edef68
2001-08-22 07:43:53 +00:00
Rodney Waldhoff 54345a5c91 committing ungenerated parts of documentation patch from Chuck Burdick
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130492 13f79535-47bb-0310-9956-ffa450edef68
2001-08-17 23:00:26 +00:00
Craig R. McClanahan e549ed5b85 Update version numbers for development subsequent to 1.0 releases.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130491 13f79535-47bb-0310-9956-ffa450edef68
2001-07-15 00:17:24 +00:00
Craig R. McClanahan 3f06f58f16 Update documentation and configuration information for a 1.0 release of
the Collections package.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130489 13f79535-47bb-0310-9956-ffa450edef68
2001-07-14 23:43:11 +00:00
Craig R. McClanahan 90e83728ac Change all calls from assert() to assertTrue() -- introduced in JUnit 3.7
-- to avoid future conflicts with the JDK standard assertion capability.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130488 13f79535-47bb-0310-9956-ffa450edef68
2001-07-14 23:33:27 +00:00
James Strachan 4a2e49fd8d Applied Mauricio's patches to the ArrayIterator and added his patches to TestArrayIterator also
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130487 13f79535-47bb-0310-9956-ffa450edef68
2001-06-05 07:20:10 +00:00
James Strachan 2ecede5902 Patched the select(inputCollection, predicate, outputCollection) method so that it does not return a variable, to avoid any confusion with the select(inputCollection, predicate) method which returns the outputCollection.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130486 13f79535-47bb-0310-9956-ffa450edef68
2001-05-22 15:53:06 +00:00
Craig R. McClanahan a36442f0d0 Work around a problem reported by the VAJ Java compiler, caused by the
fact that the superclass already has a private class named Iterator.

Submitted by:	Costin Cozianu <Costin.Cozianu@cis.canon.com>


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130485 13f79535-47bb-0310-9956-ffa450edef68
2001-05-20 21:03:30 +00:00
Rodney Waldhoff 3761b55144 I pretty sure this fixes bug 1729 (http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1729) but I don't have an environment to test it. It certainly doesn't break anything.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130484 13f79535-47bb-0310-9956-ffa450edef68
2001-05-18 00:12:45 +00:00
Rodney Waldhoff ffe28c43e0 Deprecating. I'd like to remove this class, if no one has any issues.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130482 13f79535-47bb-0310-9956-ffa450edef68
2001-05-16 22:19:23 +00:00
James Strachan 284b6f5477 Added Mauricio S. Moura's patch to ArrayIterator such that next() calls move the iterator along rather than calls to hasNext(). I've also added a JUnit test case to demonstrate it in action and validate that it works correctly.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130481 13f79535-47bb-0310-9956-ffa450edef68
2001-05-14 10:42:53 +00:00
Geir Magnusson Jr 8ab1fd1633 javadoc update. Thanks to Jon Stevens for pointing it out.
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130480 13f79535-47bb-0310-9956-ffa450edef68
2001-05-13 21:46:22 +00:00
Geir Magnusson Jr 1688a5a244 Fixed the problem reported by Thomas Fahrmeyer <thomas.fahrmeyer@einsurance.de>
where ExtendedProperties would re-process data when making a subset.  Hope no one
was depending on that :)

Also adjusted the testcase to test this.
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130474 13f79535-47bb-0310-9956-ffa450edef68
2001-05-10 00:40:09 +00:00
James Strachan 9f673d4da6 Added TestCases for LRUMap and SoftRefHashMap
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130472 13f79535-47bb-0310-9956-ffa450edef68
2001-05-06 11:10:36 +00:00
James Strachan 485615107d Added new Map implementations and Closure classes
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130471 13f79535-47bb-0310-9956-ffa450edef68
2001-05-06 11:04:25 +00:00
Rodney Waldhoff 963757362a more tests
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130470 13f79535-47bb-0310-9956-ffa450edef68
2001-05-04 16:34:27 +00:00
Rodney Waldhoff 2a069edb7e importing classes referenced in javadoc comments (javadoc won't find them otherwise)
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130469 13f79535-47bb-0310-9956-ffa450edef68
2001-05-04 16:33:18 +00:00
Rodney Waldhoff 3f66e516a7 minor javadoc fixes
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130468 13f79535-47bb-0310-9956-ffa450edef68
2001-05-04 16:32:17 +00:00
Geir Magnusson Jr d2320e8c8e Manifest for jar
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130461 13f79535-47bb-0310-9956-ffa450edef68
2001-05-04 02:42:20 +00:00
Geir Magnusson Jr 32080b32a4 Start of ExtendedProperties tests, and added to the TestAll class.
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130457 13f79535-47bb-0310-9956-ffa450edef68
2001-05-04 02:23:44 +00:00
Geir Magnusson Jr 2a49159056 A few minor changes :
1) replaced with the current version from velocity's CVS - this is a few
changes by dan

2) added the recent patch from Ilkka for dealing with encoded properties
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130456 13f79535-47bb-0310-9956-ffa450edef68
2001-05-04 02:22:48 +00:00
Rodney Waldhoff 2d79319a8d several additional tests
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130454 13f79535-47bb-0310-9956-ffa450edef68
2001-04-26 00:06:00 +00:00
Rodney Waldhoff 1e8a31f417 minor fixes to adhere more closely to the java.util.List contract
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130453 13f79535-47bb-0310-9956-ffa450edef68
2001-04-26 00:05:47 +00:00
Rodney Waldhoff 06e7d46a49 filled in testRetainAll and testToArray2
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130452 13f79535-47bb-0310-9956-ffa450edef68
2001-04-24 23:48:04 +00:00
Rodney Waldhoff c4161ee290 using tryToAdd() where appropriate
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130451 13f79535-47bb-0310-9956-ffa450edef68
2001-04-24 23:35:13 +00:00
Rodney Waldhoff 256420016e adding CollectionUtils and tests for it
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130450 13f79535-47bb-0310-9956-ffa450edef68
2001-04-24 18:48:38 +00:00
Rodney Waldhoff b8ed8bbd5e committing several files from Peter Donald and Avalon
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130448 13f79535-47bb-0310-9956-ffa450edef68
2001-04-22 19:56:37 +00:00
Craig R. McClanahan 6f129ef861 Add tests for the standard JDK collection classes (ArrayList, HashMap,
TreeMap).  These help validate the tests themselves (by proving that they
operate as expected against the standard Java APIs), and serve as
convenient base classes for testing the "fast" variants.

Make TestArrayStack extend TestArrayList so that all standard ArrayList
contracts are tested.

Test FastArrayList, FastHashMap, and FastTreeMap in both "slow" mode and
"fast" mode.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130445 13f79535-47bb-0310-9956-ffa450edef68
2001-04-21 12:22:30 +00:00
Craig R. McClanahan fff00791ed Change parentage of these classes so that they subclass ArrayList,
HashMap, and TreeMap respectively.  This improves the ability to
substitute "fast" versions for the use of the regular collection classes.

Implement clone(), equals(), and hashCode() methods in accordance with the
contracts specified in the Collections classes APIs.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130444 13f79535-47bb-0310-9956-ffa450edef68
2001-04-21 12:19:57 +00:00
Rodney Waldhoff a784206a3a * refactored test framework slightly to support more interesting tests and to make the contract more enforceable
* added some new tests and test cases


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130443 13f79535-47bb-0310-9956-ffa450edef68
2001-04-20 16:54:10 +00:00
Jason van Zyl 30681261f3 - adding some utilities from struts into the collections packages
along with some (admittedly weak for now) tests.
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130442 13f79535-47bb-0310-9956-ffa450edef68
2001-04-16 22:42:04 +00:00
Geir Magnusson Jr 73733206b9 Applied Scott Sanders' patch restoring the peek(n) method.
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130441 13f79535-47bb-0310-9956-ffa450edef68
2001-04-16 22:39:21 +00:00
Geir Magnusson Jr 596afd4f5a Moved and renamed - was originally from Velocity CVS (which came from elswhere...)
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130438 13f79535-47bb-0310-9956-ffa450edef68
2001-04-16 05:01:03 +00:00
Craig R. McClanahan b6b59b189c Flesh out the stack-related unit tests.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130437 13f79535-47bb-0310-9956-ffa450edef68
2001-04-14 19:50:31 +00:00
Craig R. McClanahan 004d5e672e Add an unsynchronized implementation of the Stack API (extends ArrayList
instead of Vector) for faster stack processing in single threaded
environments.

TODO:  Finish the unit tests (coming soon).


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130436 13f79535-47bb-0310-9956-ffa450edef68
2001-04-14 19:32:38 +00:00
Rodney Waldhoff 13a119de0b Initial revision
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130432 13f79535-47bb-0310-9956-ffa450edef68
2001-04-14 15:38:58 +00:00