public abstract class MapFactory<K,V>
extends java.lang.Object
MapFactory is a Map generator.
Subclasses should implement constructions of specific types of
Maps.
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.
| Constructor and Description |
|---|
MapFactory()
Creates a
MapFactory. |
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<K,V> |
makeMap()
Generates a new, mutable, empty
Map. |
abstract java.util.Map<K,V> |
makeMap(java.util.Map<? extends K,? extends V> map)
Generates a new
Map, using the entries of
map as a template for its initial mappings. |
public MapFactory()
MapFactory.Copyright (c) 2006 C. Scott Ananian