com.generationjava.collections
Class ClassMap

java.lang.Object
  |
  +--org.apache.commons.collections.ProxyMap
        |
        +--com.generationjava.collections.ClassMap
All Implemented Interfaces:
java.util.Map

public class ClassMap
extends org.apache.commons.collections.ProxyMap

A map which stores objects by a key Class. When obtaining the object, it will check inheritence and interface trees to see if the Class matches.


Field Summary
 
Fields inherited from class org.apache.commons.collections.ProxyMap
map
 
Constructor Summary
ClassMap(java.util.Map m)
           
 
Method Summary
 java.lang.Object get(java.lang.Object key)
          Get the object from the map.
 
Methods inherited from class org.apache.commons.collections.ProxyMap
clear, containsKey, containsValue, entrySet, equals, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassMap

public ClassMap(java.util.Map m)
Method Detail

get

public java.lang.Object get(java.lang.Object key)
Get the object from the map. If the key is not a Class object, then it uses the Class of the object.

Specified by:
get in interface java.util.Map
Overrides:
get in class org.apache.commons.collections.ProxyMap


Copyright © 2000-2003 OSJava. All Rights Reserved.