|
JUtil | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.cscott.jutil.MapFactory<K,V>
public abstract class MapFactory<K,V>
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
.
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MapFactory()
MapFactory
.
Method Detail |
---|
public Map<K,V> makeMap()
Map
.
public abstract Map<K,V> makeMap(Map<? extends K,? extends V> map)
Map
, using the entries of
map
as a template for its initial mappings.
|
JUtil | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |