org.das2.util
Class ClassMap<T>

java.lang.Object
  extended by org.das2.util.ClassMap<T>
All Implemented Interfaces:
java.util.Map<java.lang.Class,T>

public class ClassMap<T>
extends java.lang.Object
implements java.util.Map<java.lang.Class,T>

Map that takes a Class for keys, and the get method finds the closest matching class.


Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Constructor Summary
ClassMap()
          Creates a new instance of ClassMap
 
Method Summary
 void clear()
           
 boolean containsKey(java.lang.Object key)
           
 boolean containsValue(java.lang.Object value)
           
 java.util.Set entrySet()
           
 T get(java.lang.Object key)
           
 boolean isEmpty()
           
 java.util.Set<java.lang.Class> keySet()
           
 T put(java.lang.Class key, T value)
           
 void putAll(java.util.Map t)
           
 T remove(java.lang.Object key)
           
 int size()
           
 java.util.Collection values()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

ClassMap

public ClassMap()
Creates a new instance of ClassMap

Method Detail

size

public int size()
Specified by:
size in interface java.util.Map<java.lang.Class,T>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface java.util.Map<java.lang.Class,T>

containsKey

public boolean containsKey(java.lang.Object key)
Specified by:
containsKey in interface java.util.Map<java.lang.Class,T>

containsValue

public boolean containsValue(java.lang.Object value)
Specified by:
containsValue in interface java.util.Map<java.lang.Class,T>

get

public T get(java.lang.Object key)
Specified by:
get in interface java.util.Map<java.lang.Class,T>

put

public T put(java.lang.Class key,
             T value)
Specified by:
put in interface java.util.Map<java.lang.Class,T>

remove

public T remove(java.lang.Object key)
Specified by:
remove in interface java.util.Map<java.lang.Class,T>

putAll

public void putAll(java.util.Map t)
Specified by:
putAll in interface java.util.Map<java.lang.Class,T>

clear

public void clear()
Specified by:
clear in interface java.util.Map<java.lang.Class,T>

keySet

public java.util.Set<java.lang.Class> keySet()
Specified by:
keySet in interface java.util.Map<java.lang.Class,T>

values

public java.util.Collection values()
Specified by:
values in interface java.util.Map<java.lang.Class,T>

entrySet

public java.util.Set entrySet()
Specified by:
entrySet in interface java.util.Map<java.lang.Class,T>