net.cscott.jutil
public abstract class MapFactory<K,V> extends Object
MapFactory
is a Map
generator.
Subclasses should implement constructions of specific types of
Map
s.
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 HashMap
is a subtype of Map
.
Version: $Id: MapFactory.java,v 1.2 2004/01/13 20:47:05 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. |
MapFactory
.Map
.Map
, using the entries of
map
as a template for its initial mappings.