dsto.dfc.collections
Class TypeMap

java.lang.Object
  extended by dsto.dfc.collections.TypeMap
Direct Known Subclasses:
LazyTypeMap

public class TypeMap
extends Object

A map-like container that maps from classes to values. The search for a value for a class first looks at the class, then it superclasses, and then at its interfaces. If none of the specific classes and interfaces match, then the mapping for java.lang.Object is returned.

Version:
$Revision$
Author:
mpp

Constructor Summary
TypeMap()
          Constructor for TypeMap.
TypeMap(TypeMap copy)
           
 
Method Summary
 Object get(Class type)
           
 void put(Class type, Object value)
           
 void put(String type, Object value)
           
 void remove(Class type)
           
 void remove(String typeName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypeMap

public TypeMap()
Constructor for TypeMap.


TypeMap

public TypeMap(TypeMap copy)
Method Detail

put

public void put(Class type,
                Object value)

put

public void put(String type,
                Object value)

get

public Object get(Class type)

remove

public void remove(Class type)

remove

public void remove(String typeName)


Copyright © 2008 Commonwealth of Australia