ikrs.util
Class ModelBasedMapFactory<K,V>

java.lang.Object
  extended by ikrs.util.ModelBasedMapFactory<K,V>
All Implemented Interfaces:
MapFactory<K,V>

public class ModelBasedMapFactory<K,V>
extends java.lang.Object
implements MapFactory<K,V>

This is a simple model based map factory implementation. It uses the Map-class's newInstance()-method to create new instanced.


Constructor Summary
ModelBasedMapFactory(java.util.Map<K,V> model)
          Creates a new ModelBasedMapFactory.
 
Method Summary
 java.util.Map<K,V> createMap()
          Creates a new empty map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModelBasedMapFactory

public ModelBasedMapFactory(java.util.Map<K,V> model)
                     throws java.lang.NullPointerException
Creates a new ModelBasedMapFactory.

Parameters:
model - The map model to clone new instances from (must not be null).
Throws:
java.lang.NullPointerException - If model is null.
Method Detail

createMap

public java.util.Map<K,V> createMap()
Creates a new empty map.

Specified by:
createMap in interface MapFactory<K,V>