net.sf.mmm.util.collection.base
Class SimpleClassHierarchieMap<E>
java.lang.Object
net.sf.mmm.util.collection.base.AbstractClassHierarchieMap<E>
net.sf.mmm.util.collection.base.SimpleClassHierarchieMap<E>
- Type Parameters:
E - is the generic type of the elements contained in this map.
public class SimpleClassHierarchieMap<E>
- extends AbstractClassHierarchieMap<E>
This is a simple implementation of AbstractClassHierarchieMap.
- Since:
- 1.0.1
- Author:
- Joerg Hohwiller (hohwille at users.sourceforge.net)
|
Method Summary |
E |
put(Class<?> type,
E element)
This method registers the given element for the given
type. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleClassHierarchieMap
public SimpleClassHierarchieMap()
- The constructor.
SimpleClassHierarchieMap
public SimpleClassHierarchieMap(MapFactory<Map> mapFactory)
- The constructor.
- Parameters:
mapFactory - is the factory used to create the internal Map.
put
public E put(Class<?> type,
E element)
- This method registers the given
element for the given
type. Unlike a regular Map this method will also
recursively put the given element for all
super-classes and
super-interfaces of the given
type.
- Overrides:
put in class AbstractClassHierarchieMap<E>
- Parameters:
type - is the Class used as key to associate the given
element.element - is the element to put.
- Returns:
- the element that was associated directly with the given
type and has NOW been replaced with
element. - See Also:
Map.put(Object, Object)
Copyright © 2001-2010 mmm-Team. All Rights Reserved.