Rodney Waldhoff
4b47c895c4
* reduce ComparableComparator.compare to "return ((Comparable)o1).compareTo(o2)"
...
* some javadoc fixes
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130942 13f79535-47bb-0310-9956-ffa450edef68
2003-01-13 22:34:57 +00:00
Rodney Waldhoff
799b3be413
javadocs
...
add test
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130941 13f79535-47bb-0310-9956-ffa450edef68
2003-01-13 21:52:28 +00:00
Rodney Waldhoff
dc7995810d
* add copy constructors to AbstractRandomAccessIntList, ArrayIntList and ArrayUnsignedShortList
...
* more javadocs
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130940 13f79535-47bb-0310-9956-ffa450edef68
2003-01-13 12:59:45 +00:00
Rodney Waldhoff
c40e37a018
minor license, javadoc fixes
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130939 13f79535-47bb-0310-9956-ffa450edef68
2003-01-12 15:23:20 +00:00
Rodney Waldhoff
6d2d1970fb
more minor javadoc fixes
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130938 13f79535-47bb-0310-9956-ffa450edef68
2003-01-11 21:34:39 +00:00
Rodney Waldhoff
ce4f5d6bcb
javadoc
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130937 13f79535-47bb-0310-9956-ffa450edef68
2003-01-11 21:32:20 +00:00
Rodney Waldhoff
e887366de0
license fixes (acknowlegement ->acknowledgment; Group -> Software Foundation)
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130936 13f79535-47bb-0310-9956-ffa450edef68
2003-01-11 21:28:03 +00:00
Rodney Waldhoff
fcc3dec6f0
* fix gump's javadoc warnings
...
* fix spelling of "acknowledgment"
* remove duplicate @author entry
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130935 13f79535-47bb-0310-9956-ffa450edef68
2003-01-11 01:07:13 +00:00
Rodney Waldhoff
43e7d53839
document IntList.equals and IntList.hashCode contracts
...
add test ensuring proper implementation of IntList.hashCode
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130934 13f79535-47bb-0310-9956-ffa450edef68
2003-01-10 21:13:19 +00:00
Rodney Waldhoff
58e491f4b4
fix various javadoc warnings
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130933 13f79535-47bb-0310-9956-ffa450edef68
2003-01-10 20:21:25 +00:00
Rodney Waldhoff
e648a45b61
add javadocs to Int[List]Iterator
...
fix typo in IntList javadocs
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130932 13f79535-47bb-0310-9956-ffa450edef68
2003-01-10 19:24:10 +00:00
Rodney Waldhoff
40a2554a07
remove duplicate @version tag
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130931 13f79535-47bb-0310-9956-ffa450edef68
2003-01-10 18:55:13 +00:00
Rodney Waldhoff
abd1fe5068
move IntListIterator back up to primitives package (oops, didn't mean to move it down to adapter in the first place)
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130930 13f79535-47bb-0310-9956-ffa450edef68
2003-01-10 18:52:38 +00:00
Rodney Waldhoff
3a44e9291a
javadocs
...
also fix spelling of "acknowledgment" in the license text
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130929 13f79535-47bb-0310-9956-ffa450edef68
2003-01-10 18:47:15 +00:00
Rodney Waldhoff
0f4975fe36
adding serialized version of BooleanComparator, enabling relevant tests
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130928 13f79535-47bb-0310-9956-ffa450edef68
2003-01-10 17:08:29 +00:00
Rodney Waldhoff
8ae0426500
scrub imports
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130927 13f79535-47bb-0310-9956-ffa450edef68
2003-01-10 13:28:34 +00:00
Rodney Waldhoff
d1b9647e25
extract superclass TestIntList
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130926 13f79535-47bb-0310-9956-ffa450edef68
2003-01-10 13:27:55 +00:00
Rodney Waldhoff
69c423e40f
add BooleanComparator and tests
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130925 13f79535-47bb-0310-9956-ffa450edef68
2003-01-10 00:21:08 +00:00
Rodney Waldhoff
c97200ea71
add test ensuring makeObject.equals(null) doesn't fail
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130924 13f79535-47bb-0310-9956-ffa450edef68
2003-01-10 00:15:09 +00:00
Rodney Waldhoff
8f5eb39aa4
move primitive/object adapters down to adapter sub-package
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130923 13f79535-47bb-0310-9956-ffa450edef68
2003-01-09 13:40:11 +00:00
Rodney Waldhoff
a55fe3e992
add base testSerializeDeserializeThenCompare test, modify concrete TestCases so that they pass this test (or when necessary, skip them)
...
this tests the Comparator.equals contract, among others
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130922 13f79535-47bb-0310-9956-ffa450edef68
2003-01-07 23:44:20 +00:00
Stephen Colebourne
a11c82f3bc
Add Apache licence
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130921 13f79535-47bb-0310-9956-ffa450edef68
2003-01-07 23:40:57 +00:00
Rodney Waldhoff
b5f981ff98
override equals and hashCode to match Comparator contract
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130920 13f79535-47bb-0310-9956-ffa450edef68
2003-01-07 23:26:47 +00:00
Rodney Waldhoff
3264047c67
support equals and hashCode per Comparator contract
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130919 13f79535-47bb-0310-9956-ffa450edef68
2003-01-07 23:05:33 +00:00
Rodney Waldhoff
57335290f7
adjust arg name to match javadoc comment
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130918 13f79535-47bb-0310-9956-ffa450edef68
2003-01-07 18:49:01 +00:00
Rodney Waldhoff
f150178847
support equals as per the Comparator contract
...
support hashCode for this equals as per the Object contract
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130917 13f79535-47bb-0310-9956-ffa450edef68
2003-01-07 18:40:45 +00:00
Rodney Waldhoff
4c71dedc3a
cosmetic changes only (convert tabs to spaces, add braces one line blocks)
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130916 13f79535-47bb-0310-9956-ffa450edef68
2003-01-07 18:20:07 +00:00
Rodney Waldhoff
f146a43e76
add ArrayUnsignedShortList, and tests
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130915 13f79535-47bb-0310-9956-ffa450edef68
2003-01-07 18:04:52 +00:00
Rodney Waldhoff
37b1a12876
apply Rich Dougherty's patch fixing NodeCachingLinkedList unit tests
...
this also adds CommonsLinkedList and tests
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130914 13f79535-47bb-0310-9956-ffa450edef68
2003-01-07 15:18:15 +00:00
Rodney Waldhoff
8f77a02066
* fix problems with IntListList and ListIntList equals methods
...
* throw IndexOutOfBounds instead of IllegalArgument, where necessary
* re-enable TestArrayIntList suite
* re-enable primitives.TestAll suite from root (not clear why this would have been disabled)
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130913 13f79535-47bb-0310-9956-ffa450edef68
2003-01-07 13:24:52 +00:00
Rodney Waldhoff
fc65ecbb81
add toString
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130912 13f79535-47bb-0310-9956-ffa450edef68
2003-01-07 01:34:07 +00:00
Rodney Waldhoff
4f633bcf7f
screwed up the unit tests somehow, comment out for now (will fix in the AM)
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130911 13f79535-47bb-0310-9956-ffa450edef68
2003-01-07 01:29:28 +00:00
Rodney Waldhoff
0ff5503e97
* add additional adapters
...
* modify wrappers so that equals compares wrapped types
* clarify IntList.equals with javadoc
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130910 13f79535-47bb-0310-9956-ffa450edef68
2003-01-07 00:59:51 +00:00
Rodney Waldhoff
5cec4b2b96
better deprecation messages
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130905 13f79535-47bb-0310-9956-ffa450edef68
2003-01-06 04:05:39 +00:00
Rodney Waldhoff
6ce6f9ccbc
* add ArrayIntList, AbstractRandomAccessIntList
...
* add missing addAll(int,IntCollection) method to IntList
* add tests
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130904 13f79535-47bb-0310-9956-ffa450edef68
2003-01-06 03:59:12 +00:00
Rodney Waldhoff
2c7a674eea
add IntList to List adapter
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130903 13f79535-47bb-0310-9956-ffa450edef68
2003-01-06 03:57:42 +00:00
Rodney Waldhoff
5033cc3758
add IntListIterator to ListIterator adapter
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130902 13f79535-47bb-0310-9956-ffa450edef68
2003-01-06 03:57:15 +00:00
Rodney Waldhoff
081e3fcc15
oops, retainAll should delegate to retainAll, not removeAll
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130901 13f79535-47bb-0310-9956-ffa450edef68
2003-01-06 03:56:21 +00:00
Rodney Waldhoff
8922bd8321
make package doc scalable
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130900 13f79535-47bb-0310-9956-ffa450edef68
2003-01-05 13:33:05 +00:00
Rodney Waldhoff
9262cd48a0
add basic adapters
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130899 13f79535-47bb-0310-9956-ffa450edef68
2003-01-05 03:03:42 +00:00
Rodney Waldhoff
456a094e3f
add base int collection impl
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130898 13f79535-47bb-0310-9956-ffa450edef68
2003-01-05 03:03:14 +00:00
Rodney Waldhoff
44e2acadff
get should return int not Object
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130897 13f79535-47bb-0310-9956-ffa450edef68
2003-01-04 23:16:29 +00:00
Rodney Waldhoff
8302eabc7b
add IntCollection, IntList, IntIterator, IntListIterator
...
deprecate various AbstractIntList implementations as a warning of impending change
(note that nothing in primitives.* has yet been released)
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130896 13f79535-47bb-0310-9956-ffa450edef68
2003-01-04 15:00:57 +00:00
Rodney Waldhoff
ceba1806c3
should have updated copyright with last commit
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130895 13f79535-47bb-0310-9956-ffa450edef68
2003-01-04 13:43:10 +00:00
Rodney Waldhoff
42f142840e
name the file we're looking for on test failure
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130894 13f79535-47bb-0310-9956-ffa450edef68
2003-01-04 13:10:27 +00:00
Stephen Colebourne
968607b9c5
Add empty unmodifiable implementations for all collections
...
Add synchronized/unmodifiable implementations for all collections
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130892 13f79535-47bb-0310-9956-ffa450edef68
2002-12-15 13:05:03 +00:00
Stephen Colebourne
7fe55f624b
Test reworked array iterators to include Iterator and ListIterator implementations.
...
Also test Object array versions.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130891 13f79535-47bb-0310-9956-ffa450edef68
2002-12-13 12:10:48 +00:00
Stephen Colebourne
93b9f67629
Rework array iterators to include Iterator and ListIterator implementations.
...
Also add Object array versions for better performance.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130890 13f79535-47bb-0310-9956-ffa450edef68
2002-12-13 12:04:16 +00:00
Stephen Colebourne
3f3e957206
Add test for remove on an iterator
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130889 13f79535-47bb-0310-9956-ffa450edef68
2002-12-13 12:03:46 +00:00
Stephen Colebourne
a84170e095
Add method to indicate that iterator doesn't support remove.
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130888 13f79535-47bb-0310-9956-ffa450edef68
2002-12-13 12:03:06 +00:00
Stephen Colebourne
4ca0da456a
Fix remove method to throw correct exception
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130887 13f79535-47bb-0310-9956-ffa450edef68
2002-12-13 11:03:42 +00:00
Stephen Colebourne
50a4521771
Reuse UnmodifiableIterator in IteratorUtils, from Rich Dougherty
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130886 13f79535-47bb-0310-9956-ffa450edef68
2002-12-11 19:05:14 +00:00
Stephen Colebourne
ba27ecd2d4
Add IteratorUtils unmodifiable iterators, from Rich Dougherty
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130885 13f79535-47bb-0310-9956-ffa450edef68
2002-12-08 15:42:35 +00:00
Stephen Colebourne
257fbcc0a5
Update to latest package status
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130884 13f79535-47bb-0310-9956-ffa450edef68
2002-12-08 15:30:58 +00:00
Stephen Colebourne
35041694f4
Add new countMatches method
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130883 13f79535-47bb-0310-9956-ffa450edef68
2002-12-08 15:29:59 +00:00
Stephen Colebourne
92d67a604d
Test the new countMatches method
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130882 13f79535-47bb-0310-9956-ffa450edef68
2002-12-08 15:29:26 +00:00
Stephen Colebourne
0ac46dd1c3
Add tests for select/selectRejected methods
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130881 13f79535-47bb-0310-9956-ffa450edef68
2002-11-24 21:12:30 +00:00
Stephen Colebourne
aa139cebf0
Add selectRejected methods, from BluePhelix@web.de (Peter)
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130880 13f79535-47bb-0310-9956-ffa450edef68
2002-11-24 21:11:27 +00:00
Stephen Colebourne
607a1f8418
Test for indexOf, from Johal
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130879 13f79535-47bb-0310-9956-ffa450edef68
2002-11-24 20:49:29 +00:00
Stephen Colebourne
f6d8876a41
Fix bug in indexOf, identified by Johal
...
Reformat and Javadoc file
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130878 13f79535-47bb-0310-9956-ffa450edef68
2002-11-24 20:48:35 +00:00
Stephen Colebourne
fe74db761c
Remove map key collection when it becomes empty so equals works.
...
from Serhiy Yevtushenko
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130877 13f79535-47bb-0310-9956-ffa450edef68
2002-11-24 20:25:55 +00:00
Stephen Colebourne
9770d8be10
Add test for equals that demonstrates a bug
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130876 13f79535-47bb-0310-9956-ffa450edef68
2002-11-24 20:24:49 +00:00
Stephen Colebourne
0cad010ce8
Fix bug that values() was not backed by Map
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130875 13f79535-47bb-0310-9956-ffa450edef68
2002-11-24 19:38:09 +00:00
Stephen Colebourne
c8de9e8066
Applied fixes from Julien Buret to improve MultiMap including
...
- values() backed by real map
- clone works properly
- ArrayLists can be added to a MultiMap
Javadoc class
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130874 13f79535-47bb-0310-9956-ffa450edef68
2002-11-24 19:36:48 +00:00
Stephen Colebourne
7c12e16836
Improve javadoc description of what a MultiMap is
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130873 13f79535-47bb-0310-9956-ffa450edef68
2002-11-24 19:33:19 +00:00
Stephen Colebourne
12f98e4bc4
Fix Concurrent Modification bug in purge(), from Eduardo Francos
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130872 13f79535-47bb-0310-9956-ffa450edef68
2002-11-24 17:30:15 +00:00
Stephen Colebourne
e02e9818cf
Add BoundedCollection, from Herve Quiroz
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130871 13f79535-47bb-0310-9956-ffa450edef68
2002-11-24 16:23:21 +00:00
Stephen Colebourne
9d123df763
Add LoopingIterator, from Jonathan Carlson
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130869 13f79535-47bb-0310-9956-ffa450edef68
2002-11-21 23:09:26 +00:00
Stephen Colebourne
af5dd4d71a
Add LoopingIterator
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130868 13f79535-47bb-0310-9956-ffa450edef68
2002-11-21 23:08:27 +00:00
Stephen Colebourne
e28052ee76
Test Performance optimised LinkedList, from Jeff Varszegi
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130867 13f79535-47bb-0310-9956-ffa450edef68
2002-11-18 23:58:46 +00:00
Stephen Colebourne
4fbfa16c6e
Performance optimised LinkedList, from Jeff Varszegi
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130866 13f79535-47bb-0310-9956-ffa450edef68
2002-11-18 23:58:17 +00:00
Henri Yandell
7510ff1b6d
Unused variables removed.
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130865 13f79535-47bb-0310-9956-ffa450edef68
2002-11-07 21:43:36 +00:00
Henri Yandell
49f5da622f
Unable to justify its algorithm lookup for finding a value as generic enough.
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130864 13f79535-47bb-0310-9956-ffa450edef68
2002-11-07 21:42:45 +00:00
Henri Yandell
827fe6c697
Removed unused local variable max.
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130863 13f79535-47bb-0310-9956-ffa450edef68
2002-11-07 21:32:36 +00:00
Rodney Waldhoff
db708754f6
allow cardinality(null,collection) and add test for it
...
(fixing http://issues.apache.org/bugzilla/show_bug.cgi?id=13785 per suggestion of Serhiy Yevtushenko)
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130862 13f79535-47bb-0310-9956-ffa450edef68
2002-11-01 19:54:27 +00:00
Rodney Waldhoff
fcad5944ac
add javadoc comment
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130861 13f79535-47bb-0310-9956-ffa450edef68
2002-11-01 19:41:00 +00:00
Rodney Waldhoff
aa959e46cf
add generic TestMap test for http://issues.apache.org/bugzilla/show_bug.cgi?id=9573 (values isn't backed by map), but override the test in TestMultiHashMap for now
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130860 13f79535-47bb-0310-9956-ffa450edef68
2002-11-01 19:36:54 +00:00
Rodney Waldhoff
0cb8046cd3
have all setUp and tearDown methods throw Exception, so they can be extended more easily (see http://issues.apache.org/bugzilla/show_bug.cgi?id=14151 )
...
update/fix copyright in a few of these touched files
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130859 13f79535-47bb-0310-9956-ffa450edef68
2002-11-01 19:07:54 +00:00
Rodney Waldhoff
05c0b3a792
fix bug pointed out bu Jonathan Carlson
...
add test that demonstrates
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130856 13f79535-47bb-0310-9956-ffa450edef68
2002-10-31 21:55:23 +00:00
Henri Yandell
8fe3197c56
Uses inheritence in the get() value lookup to decide which value to return.
...
I find this very useful when implementing registries of which Class acts
upon which value. So in a ConvertUtils class, a ClassMap would handle the
many Converters, deciding which Converter to use on which value.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130852 13f79535-47bb-0310-9956-ffa450edef68
2002-10-23 03:35:23 +00:00
Henri Yandell
d2369cf6d4
2.1 will be 2.1 spec :)
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130845 13f79535-47bb-0310-9956-ffa450edef68
2002-10-20 04:09:20 +00:00
Henri Yandell
b92d5e054f
This needs to be changed to change the manifest. doh :)
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130843 13f79535-47bb-0310-9956-ffa450edef68
2002-10-18 07:19:02 +00:00
Henri Yandell
fbf05cfc64
No point recording how long it's been in Avalon now that it's not in Avalon.
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130841 13f79535-47bb-0310-9956-ffa450edef68
2002-10-18 07:03:12 +00:00
Stephen Colebourne
04765f1d41
Delay primitives to 2.2 release
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130836 13f79535-47bb-0310-9956-ffa450edef68
2002-10-15 21:51:21 +00:00
Stephen Colebourne
7b54609df8
Javadoc improvement
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130833 13f79535-47bb-0310-9956-ffa450edef68
2002-10-13 22:31:35 +00:00
Stephen Colebourne
86df16092e
Fix to avoid javadoc generation warnings
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130832 13f79535-47bb-0310-9956-ffa450edef68
2002-10-13 13:55:35 +00:00
Stephen Colebourne
de7c3085ac
Add tests for negative size constructors
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130831 13f79535-47bb-0310-9956-ffa450edef68
2002-10-13 13:00:23 +00:00
Stephen Colebourne
30f22f1ba9
Use field access not method for testing
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130830 13f79535-47bb-0310-9956-ffa450edef68
2002-10-13 12:59:52 +00:00
Stephen Colebourne
f6692b29e6
Tidy javadoc and code layout
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130829 13f79535-47bb-0310-9956-ffa450edef68
2002-10-13 12:59:04 +00:00
Stephen Colebourne
49d9fa86a6
Add no args constructor
...
Tidy javadoc and code layout
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130828 13f79535-47bb-0310-9956-ffa450edef68
2002-10-13 12:57:12 +00:00
Stephen Colebourne
3aba1278c3
Enable nulls to be added to the stack
...
Add initial size constructor
Tidy javadoc and code layout
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130827 13f79535-47bb-0310-9956-ffa450edef68
2002-10-13 12:56:42 +00:00
Stephen Colebourne
374e746bb0
Deprecate in favour of StringUtils in [lang]
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130825 13f79535-47bb-0310-9956-ffa450edef68
2002-10-13 11:17:57 +00:00
Stephen Colebourne
4e2452d242
Javadoc improvements, especially exception descriptions
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130822 13f79535-47bb-0310-9956-ffa450edef68
2002-10-13 00:38:36 +00:00
Stephen Colebourne
332b8ff8d8
Remove as added after 2.0, and is now in subpackage
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130821 13f79535-47bb-0310-9956-ffa450edef68
2002-10-12 23:25:27 +00:00
Stephen Colebourne
9a451b11ca
Fix unused imports (patch from Steve Downey)
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130820 13f79535-47bb-0310-9956-ffa450edef68
2002-10-12 22:36:23 +00:00
Stephen Colebourne
3b553f88ce
Add whole package testing class for comparators
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130819 13f79535-47bb-0310-9956-ffa450edef68
2002-10-12 22:35:37 +00:00
Stephen Colebourne
febd99c162
Add whole package testing class
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130818 13f79535-47bb-0310-9956-ffa450edef68
2002-10-12 22:35:10 +00:00
Stephen Colebourne
9ba0768cf5
Fix unused imports and javadoc links (patch from Steve Downey)
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130816 13f79535-47bb-0310-9956-ffa450edef68
2002-10-12 22:15:21 +00:00
Stephen Colebourne
f93b13144b
Removed unused variable (patch from Steve Downey)
...
Added class level javadoc
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130815 13f79535-47bb-0310-9956-ffa450edef68
2002-10-12 22:04:59 +00:00
Stephen Colebourne
3f22cc8398
Removed unused variable (patch from Steve Downey)
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130814 13f79535-47bb-0310-9956-ffa450edef68
2002-10-12 21:59:45 +00:00
Rodney Waldhoff
a47d25a4ff
* allow zero as an initial capacity for the primitive array lists (once again). (java.util.ArrayList allows it, why shouldn't we?)
...
* add tests to enforce the contract
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130812 13f79535-47bb-0310-9956-ffa450edef68
2002-09-07 20:33:32 +00:00
Rodney Waldhoff
034ec419ea
add containsAny(Collection,Collection) and tests
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130811 13f79535-47bb-0310-9956-ffa450edef68
2002-09-07 19:49:49 +00:00
Rodney Waldhoff
52cc5cbef2
minor doc change
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130810 13f79535-47bb-0310-9956-ffa450edef68
2002-09-07 00:28:53 +00:00
pjack
3b4a050148
Added better class JavaDoc as suggested by Jonathan Carlson.
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130809 13f79535-47bb-0310-9956-ffa450edef68
2002-08-23 17:31:28 +00:00
pjack
cb3d67cf61
Added some notes about the abstraction layers.
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130808 13f79535-47bb-0310-9956-ffa450edef68
2002-08-22 02:08:32 +00:00
pjack
f7e4fdd91d
Added better class-level documentation as suggested by Jonathan Carlson.
...
Also provided default implementations for many of the abstract methods
in Abstract*List.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130807 13f79535-47bb-0310-9956-ffa450edef68
2002-08-22 01:50:54 +00:00
pjack
ebdaf3cb68
Placed Abstract*ArrayList layer under Abstract*List layer. Erased
...
Serializable declarations from all abstract superclasses (but kept it in
all concrete implementations).
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130806 13f79535-47bb-0310-9956-ffa450edef68
2002-08-21 23:54:18 +00:00
pjack
ab21cb546c
Removed TestSoftRefHashMap. It was never invoked by TestAll, and the
...
class it tests has been deprecated; this removal eliminates a
deprecation warning from the build.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130804 13f79535-47bb-0310-9956-ffa450edef68
2002-08-20 00:16:30 +00:00
pjack
32dc4757e6
Fixed JavaDoc errors.
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130803 13f79535-47bb-0310-9956-ffa450edef68
2002-08-19 21:56:18 +00:00
pjack
cddf8c5c66
Renamed AbstractIntArrayList, AbstractShortArrayList,
...
AbstractLongArrayList to AbstractIntList, AbstractShortList,
AbstractLongList. New names follow general naming pattern in
Collections Framework, and anticipate later IntList, ShortList and
LongList interfaces.
Recommended by Jonathan Carlson (joncrlsn2 at yahoo dot com).
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130802 13f79535-47bb-0310-9956-ffa450edef68
2002-08-19 21:19:03 +00:00
pjack
f9d36a36f4
ReferenceMap is no longer serializable. There were issues with its
...
serialization methods on Java 1.3 (but 1.2 and 1.4 worked). Issue will
be addressed in a later release.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130801 13f79535-47bb-0310-9956-ffa450edef68
2002-08-19 19:44:59 +00:00
pjack
901deeeeff
Removed bounded decorators from the source. We might resurrect these
...
after the 2.1 release, if we can address their difficulties.
PR:
Obtained from:
Submitted by:
Reviewed by:
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130798 13f79535-47bb-0310-9956-ffa450edef68
2002-08-18 20:11:38 +00:00
Stephen Colebourne
aee5310ddd
Test filter() and transform()
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130797 13f79535-47bb-0310-9956-ffa450edef68
2002-08-18 15:26:43 +00:00
Stephen Colebourne
41be9cbfa9
Add filter() and transform()
...
Add lots of javadoc
Deprecate empty iterator
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130796 13f79535-47bb-0310-9956-ffa450edef68
2002-08-18 15:26:20 +00:00
Stephen Colebourne
844eb0adcc
Rename public field (naming conventions)
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130795 13f79535-47bb-0310-9956-ffa450edef68
2002-08-17 22:17:53 +00:00
Stephen Colebourne
d72a2c1442
Test IteratorUtils added
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130794 13f79535-47bb-0310-9956-ffa450edef68
2002-08-17 22:14:47 +00:00
Stephen Colebourne
5b1e839241
Add specific classes (singleton) for empty cases
...
Add toList and toArray
Rename certain methods to toXxx and asXxx
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130793 13f79535-47bb-0310-9956-ffa450edef68
2002-08-17 22:14:22 +00:00
pjack
a24ad64d19
More IllegalArgument checks to decorators.
...
PR:
Obtained from:
Submitted by:
Reviewed by:
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130792 13f79535-47bb-0310-9956-ffa450edef68
2002-08-17 21:10:46 +00:00
Stephen Colebourne
db484419cb
ComparatorUtils renamed methods
...
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130791 13f79535-47bb-0310-9956-ffa450edef68
2002-08-17 12:07:24 +00:00
Stephen Colebourne
49f3fe1be6
Rename methods
...
Add chainedComparator
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130790 13f79535-47bb-0310-9956-ffa450edef68
2002-08-17 12:06:56 +00:00
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