net.sf.morph.util
Class TypeMap

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap
          extended by net.sf.morph.util.TypeMap
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map

public class TypeMap
extends java.util.HashMap

A map where all keys and values are of type Class. This is accomplished by making the put(Object, Object)method convert the key and value supplied to it to a Class object using ClassUtils.newInstance(Object). This class is included to ease the configuration of Morph. One example of where it is used is in SimpleInstantiatingReflector.setRequestedToInstantiatedTypeMap(Map).

Since:
Apr 14, 2005
Author:
Matt Sgarlata
See Also:
Serialized Form

Constructor Summary
TypeMap()
          Create a new TypeMap.
TypeMap(int initialCapacity)
          Create a new TypeMap.
TypeMap(int initialCapacity, float loadFactor)
          Create a new TypeMap.
TypeMap(java.util.Map map)
          Create a new TypeMap.
 
Method Summary
 java.lang.Object put(java.lang.Object key, java.lang.Object value)
          
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

TypeMap

public TypeMap()
Create a new TypeMap.


TypeMap

public TypeMap(int initialCapacity)
Create a new TypeMap.

Parameters:
initialCapacity -

TypeMap

public TypeMap(int initialCapacity,
               float loadFactor)
Create a new TypeMap.

Parameters:
initialCapacity -
loadFactor -

TypeMap

public TypeMap(java.util.Map map)
Create a new TypeMap.

Parameters:
map -
Method Detail

put

public java.lang.Object put(java.lang.Object key,
                            java.lang.Object value)

Specified by:
put in interface java.util.Map
Overrides:
put in class java.util.HashMap


Copyright © 2004-2008.