org.codehaus.plexus.component.collections
Class ComponentMap<T>

java.lang.Object
  extended by org.codehaus.plexus.component.collections.AbstractComponentCollection<T>
      extended by org.codehaus.plexus.component.collections.ComponentMap<T>
All Implemented Interfaces:
Map<String,T>

public class ComponentMap<T>
extends AbstractComponentCollection<T>
implements Map<String,T>

Author:
Jason van Zyl FIXME: [jdcasey] We need to review the efficiency (in speed and memory) of this collection...

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
 
Fields inherited from class org.codehaus.plexus.component.collections.AbstractComponentCollection
componentType, container, hostComponent, logger, role, roleHints
 
Constructor Summary
ComponentMap(MutablePlexusContainer container, Class<T> type, String role, List<String> roleHints, String hostComponent)
           
 
Method Summary
protected  boolean checkUpdate()
           
 boolean containsKey(Object key)
           
 boolean containsValue(Object value)
           
 Set<Map.Entry<String,T>> entrySet()
           
 boolean equals(Object o)
           
 T get(Object k)
           
 int hashCode()
           
 boolean isEmpty()
           
 Set<String> keySet()
           
 T put(String key, T value)
           
 void putAll(Map<? extends String,? extends T> map)
           
protected  void releaseAllCallback()
           
 T remove(Object key)
           
 int size()
           
 Collection<T> values()
           
 
Methods inherited from class org.codehaus.plexus.component.collections.AbstractComponentCollection
clear, getComponentDescriptorMap, lookup
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Map
clear
 

Constructor Detail

ComponentMap

public ComponentMap(MutablePlexusContainer container,
                    Class<T> type,
                    String role,
                    List<String> roleHints,
                    String hostComponent)
Method Detail

size

public int size()
Specified by:
size in interface Map<String,T>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Map<String,T>

containsKey

public boolean containsKey(Object key)
Specified by:
containsKey in interface Map<String,T>

containsValue

public boolean containsValue(Object value)
Specified by:
containsValue in interface Map<String,T>

get

public T get(Object k)
Specified by:
get in interface Map<String,T>

put

public T put(String key,
             T value)
Specified by:
put in interface Map<String,T>

putAll

public void putAll(Map<? extends String,? extends T> map)
Specified by:
putAll in interface Map<String,T>

keySet

public Set<String> keySet()
Specified by:
keySet in interface Map<String,T>

values

public Collection<T> values()
Specified by:
values in interface Map<String,T>

entrySet

public Set<Map.Entry<String,T>> entrySet()
Specified by:
entrySet in interface Map<String,T>

equals

public boolean equals(Object o)
Specified by:
equals in interface Map<String,T>
Overrides:
equals in class Object

hashCode

public int hashCode()
Specified by:
hashCode in interface Map<String,T>
Overrides:
hashCode in class Object

remove

public T remove(Object key)
Specified by:
remove in interface Map<String,T>

checkUpdate

protected boolean checkUpdate()
Overrides:
checkUpdate in class AbstractComponentCollection<T>

releaseAllCallback

protected void releaseAllCallback()
Specified by:
releaseAllCallback in class AbstractComponentCollection<T>


Copyright © 2001–2014 Codehaus. All rights reserved.