Merging from -r468106:814127 of collections_jdk5_branch - namely where this code was generified; mostly in r738956.

Also see the following revisions:

    ------------------------------------------------------------------------
    r740150 | mbenson | 2009-02-02 15:24:00 -0800 (Mon, 02 Feb 2009) | 1 line
    
    make all [collections] maps implement IterableMap
    ------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@815127 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Henri Yandell 2009-09-15 05:57:29 +00:00
parent 039cffde35
commit cb130f8056
1 changed files with 8 additions and 6 deletions

View File

@ -19,6 +19,8 @@ package org.apache.commons.collections.map;
import java.util.HashMap;
import java.util.Map;
import org.apache.commons.collections.IterableMap;
import junit.framework.Test;
import junit.framework.TestSuite;
@ -31,7 +33,7 @@ import junit.framework.TestSuite;
*
* @author Stephen Colebourne
*/
public class TestFixedSizeMap extends AbstractTestMap {
public class TestFixedSizeMap<K, V> extends AbstractTestIterableMap<K, V> {
public TestFixedSizeMap(String testName) {
super(testName);
@ -46,16 +48,16 @@ public class TestFixedSizeMap extends AbstractTestMap {
junit.textui.TestRunner.main(testCaseName);
}
public Map makeEmptyMap() {
return FixedSizeMap.decorate(new HashMap());
public IterableMap<K, V> makeObject() {
return FixedSizeMap.decorate(new HashMap<K, V>());
}
public Map makeFullMap() {
Map map = new HashMap();
public IterableMap<K, V> makeFullMap() {
Map<K, V> map = new HashMap<K, V>();
addSampleMappings(map);
return FixedSizeMap.decorate(map);
}
public boolean isPutAddSupported() {
return false;
}