net.cscott.jutil
public abstract class MapFactory<K,V> extends Object
Note also that the current limitations on parametric types in
Java mean that we can't easily type this class as
MapFactory<M extends Map<K,V>,K,V>
,
as MapFactory<HashMap<K,V>,K,V>
is not
a subtype of MapFactory<Map<K,V>,K,V>
,
even though java.util.HashMap is a subtype of Map.
Version: $Id: MapFactory.java,v 1.4 2006-10-30 19:58:06 cananian Exp $
Constructor Summary | |
---|---|
MapFactory() Creates a MapFactory. |
Method Summary | |
---|---|
Map<K,V> | makeMap() Generates a new, mutable, empty Map. |
abstract Map<K,V> | makeMap(Map<? extends K,? extends V> map) Generates a new Map, using the entries of
map as a template for its initial mappings. |
map
as a template for its initial mappings.