org.eclipse.net4j.util.container.delegate
Class ContainerMap<K,V>

java.lang.Object
  extended by org.eclipse.net4j.util.event.Notifier
      extended by org.eclipse.net4j.util.container.delegate.AbstractDelegator<Map.Entry<K,V>>
          extended by org.eclipse.net4j.util.container.delegate.ContainerMap<K,V>
All Implemented Interfaces:
Map<K,V>, IContainerMap<K,V>, IContainer<Map.Entry<K,V>>, INotifier

public class ContainerMap<K,V>
extends AbstractDelegator<Map.Entry<K,V>>
implements IContainerMap<K,V>

A default implementation of a container map.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.net4j.util.container.delegate.AbstractDelegator
AbstractDelegator.DelegatingIterator
 
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.container.IContainer
IContainer.Modifiable<E>
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Constructor Summary
ContainerMap(Map<K,V> delegate)
           
 
Method Summary
 void clear()
           
 boolean containsKey(Object key)
           
 boolean containsValue(Object value)
           
 Set<Map.Entry<K,V>> entrySet()
           
 V get(Object key)
           
 Map<K,V> getDelegate()
           
 Map.Entry<K,V>[] getElements()
           
 boolean isEmpty()
           
 Set<K> keySet()
           
 V put(K key, V value)
           
 void putAll(Map<? extends K,? extends V> t)
           
 V remove(Object key)
           
 int size()
           
 Collection<V> values()
           
 
Methods inherited from class org.eclipse.net4j.util.container.delegate.AbstractDelegator
createEvent, dispatchEvent, fireAddedEvent, fireRemovedEvent
 
Methods inherited from class org.eclipse.net4j.util.event.Notifier
addListener, fireEvent, fireEvent, fireEvent, fireThrowable, firstListenerAdded, getListeners, getNotificationService, hasListeners, lastListenerRemoved, removeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.net4j.util.event.INotifier
addListener, getListeners, hasListeners, removeListener
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

ContainerMap

public ContainerMap(Map<K,V> delegate)
Method Detail

getDelegate

public Map<K,V> getDelegate()
Specified by:
getDelegate in interface IContainerMap<K,V>

clear

public void clear()
Specified by:
clear in interface Map<K,V>
Category
WRITE

put

public V put(K key,
             V value)
Specified by:
put in interface Map<K,V>
Category
WRITE

putAll

public void putAll(Map<? extends K,? extends V> t)
Specified by:
putAll in interface Map<K,V>
Category
WRITE

remove

public V remove(Object key)
Specified by:
remove in interface Map<K,V>
Category
WRITE

containsKey

public boolean containsKey(Object key)
Specified by:
containsKey in interface Map<K,V>
Category
READ

containsValue

public boolean containsValue(Object value)
Specified by:
containsValue in interface Map<K,V>
Category
READ

get

public V get(Object key)
Specified by:
get in interface Map<K,V>
Category
READ

size

public int size()
Specified by:
size in interface Map<K,V>
Category
READ

getElements

public Map.Entry<K,V>[] getElements()
Specified by:
getElements in interface IContainer<Map.Entry<K,V>>
Category
READ

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Map<K,V>
Specified by:
isEmpty in interface IContainer<Map.Entry<K,V>>
Category
READ

entrySet

public Set<Map.Entry<K,V>> entrySet()
Specified by:
entrySet in interface Map<K,V>
Category
READ

keySet

public Set<K> keySet()
Specified by:
keySet in interface Map<K,V>
Category
READ

values

public Collection<V> values()
Specified by:
values in interface Map<K,V>
Category
READ


Copyright (c) 2011, 2012 Eike Stepper (Berlin, Germany) and others.