Commit Graph

1568 Commits

Author SHA1 Message Date
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 a87ee3a6f5 release notes portion of the release 2.0 status
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130551 13f79535-47bb-0310-9956-ffa450edef68
2002-02-21 22:20:55 +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
Henri Yandell 449753321f Added myself as a committer as I've been committing changes and plan to
continue committing changes unless there's disagreement.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130547 13f79535-47bb-0310-9956-ffa450edef68
2002-02-21 17:38:28 +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
Michael Smith 31bc597e42 Added myself as a committer. This also acts as a test to make sure I have things setup properly.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130545 13f79535-47bb-0310-9956-ffa450edef68
2002-02-21 02:01:21 +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 ce972ca58f Externalized version of an LRUMap for Collections 1.x (created by
CVS version 1.3 of the LRUMap class)


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130524 13f79535-47bb-0310-9956-ffa450edef68
2002-02-14 22:41:54 +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
Morgan James Delagrange 97f0e7ff26 adding myself as a contributor
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130513 13f79535-47bb-0310-9956-ffa450edef68
2002-02-13 20:21:05 +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