Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Util.Collections
Class MapFactory  view MapFactory download MapFactory.java

java.lang.Object
  extended byUtil.Collections.MapFactory
Direct Known Subclasses:
Factories.SerialMapFactory, LightMap.Factory, MultiMapFactory, SetRepository.SimpleHashSetFactory

public abstract class MapFactory
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.

Version:
$Id: MapFactory.java,v 1.2 2003/03/29 07:58:35 joewhaley Exp $

Constructor Summary
MapFactory()
          Creates a MapFactory.
 
Method Summary
 java.util.Map makeMap()
          Generates a new, mutable, empty Map.
abstract  java.util.Map makeMap(java.util.Map 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

MapFactory

public MapFactory()
Creates a MapFactory.

Method Detail

makeMap

public java.util.Map makeMap()
Generates a new, mutable, empty Map.


makeMap

public abstract java.util.Map makeMap(java.util.Map map)
Generates a new Map, using the entries of map as a template for its initial mappings.