Generics
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1026255 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1ae1850534
commit
a99c022fbb
|
@ -24,23 +24,23 @@ import java.util.Collection;
|
|||
* the class has to be separate of TestCompositeMap, else the test
|
||||
* class also has to be serialized.
|
||||
*/
|
||||
class EmptyMapMutator implements CompositeMap.MapMutator {
|
||||
class EmptyMapMutator<K,V> implements CompositeMap.MapMutator<K,V> {
|
||||
/** Serialization version */
|
||||
private static final long serialVersionUID = -2729718980002476794L;
|
||||
|
||||
public void resolveCollision(CompositeMap composite,
|
||||
Map existing,
|
||||
Map added,
|
||||
Collection intersect) {
|
||||
public void resolveCollision(CompositeMap<K,V> composite,
|
||||
Map<K,V> existing,
|
||||
Map<K,V> added,
|
||||
Collection<K> intersect) {
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
public Object put(CompositeMap map, Map[] composited, Object key, Object value) {
|
||||
public V put(CompositeMap<K, V> map, Map<K, V>[] composited, K key, V value) {
|
||||
return composited[0].put(key, value);
|
||||
}
|
||||
|
||||
public void putAll(CompositeMap map, Map[] composited, Map t) {
|
||||
public void putAll(CompositeMap<K, V> map, Map<K, V>[] composited, Map<? extends K, ? extends V> t) {
|
||||
composited[0].putAll(t);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ public class TestCompositeMap<K, V> extends AbstractTestIterableMap<K, V> {
|
|||
public CompositeMap<K, V> makeObject() {
|
||||
CompositeMap<K, V> map = new CompositeMap<K, V>();
|
||||
map.addComposited(new HashMap<K, V>());
|
||||
map.setMutator( new EmptyMapMutator() );
|
||||
map.setMutator( new EmptyMapMutator<K, V>() );
|
||||
return map;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue