org.eclipse.emf.common.util
Class ECollections.UnmodifiableEMap<K,V>

java.lang.Object
  extended by org.eclipse.emf.common.util.ECollections.UnmodifiableEList<java.util.Map.Entry<K,V>>
      extended by org.eclipse.emf.common.util.ECollections.UnmodifiableEMap<K,V>
All Implemented Interfaces:
java.lang.Iterable<java.util.Map.Entry<K,V>>, java.util.Collection<java.util.Map.Entry<K,V>>, java.util.List<java.util.Map.Entry<K,V>>, EList<java.util.Map.Entry<K,V>>, EMap<K,V>
Enclosing class:
ECollections

private static class ECollections.UnmodifiableEMap<K,V>
extends ECollections.UnmodifiableEList<java.util.Map.Entry<K,V>>
implements EMap<K,V>


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.emf.common.util.EMap
EMap.InternalMapView<K,V>
 
Field Summary
protected  EMap<? extends K,? extends V> eMap
           
 
Fields inherited from class org.eclipse.emf.common.util.ECollections.UnmodifiableEList
list
 
Constructor Summary
ECollections.UnmodifiableEMap(EMap<? extends K,? extends V> eMap)
           
 
Method Summary
 boolean containsKey(java.lang.Object key)
          Returns whether the key is associated with a value.
 boolean containsValue(java.lang.Object value)
          Returns whether the value is associated with a key.
 java.util.Set<java.util.Map.Entry<K,V>> entrySet()
          Returns a set view of the entries.
 V get(java.lang.Object key)
          Returns the value associated with the key.
 int indexOfKey(java.lang.Object key)
          Returns the index in the list of the entry with the given key, or -1, if there is no such entry.
 java.util.Set<K> keySet()
          Returns a set view of the keys of the entries.
 java.util.Map<K,V> map()
          Returns a map view.
 V put(K key, V value)
          Associates the key with the value and returns the value previously associated with the key, or null.
 void putAll(EMap<? extends K,? extends V> map)
          Puts each Map.Entry of the given map into this one.
 void putAll(java.util.Map<? extends K,? extends V> map)
          Puts each Map.Entry of the given map into this one.
 V removeKey(java.lang.Object key)
          Disassociates the key from its value, and returns the value formerly associated with the key.
 java.util.Collection<V> values()
          Returns a collection view the values of the entries.
 
Methods inherited from class org.eclipse.emf.common.util.ECollections.UnmodifiableEList
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, move, move, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.emf.common.util.EList
move, move
 
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray
 

Field Detail

eMap

protected EMap<? extends K,? extends V> eMap
Constructor Detail

ECollections.UnmodifiableEMap

public ECollections.UnmodifiableEMap(EMap<? extends K,? extends V> eMap)
Method Detail

containsKey

public boolean containsKey(java.lang.Object key)
Description copied from interface: EMap
Returns whether the key is associated with a value.

Specified by:
containsKey in interface EMap<K,V>
Parameters:
key - a key associated with a value.
Returns:
whether the key is associated with a value.

containsValue

public boolean containsValue(java.lang.Object value)
Description copied from interface: EMap
Returns whether the value is associated with a key.

Specified by:
containsValue in interface EMap<K,V>
Parameters:
value - a value associated with a key.
Returns:
whether the value is associated with a key.

entrySet

public java.util.Set<java.util.Map.Entry<K,V>> entrySet()
Description copied from interface: EMap
Returns a set view of the entries.

Specified by:
entrySet in interface EMap<K,V>
Returns:
a set view of the entries.

get

public V get(java.lang.Object key)
Description copied from interface: EMap
Returns the value associated with the key. The key, the value, or both may be null.

Specified by:
get in interface EMap<K,V>
Parameters:
key - the key of the value.
Returns:
the value associated with the key.

indexOfKey

public int indexOfKey(java.lang.Object key)
Description copied from interface: EMap
Returns the index in the list of the entry with the given key, or -1, if there is no such entry.

Specified by:
indexOfKey in interface EMap<K,V>
Parameters:
key - a key.
Returns:
the index of the entry with the given key.

keySet

public java.util.Set<K> keySet()
Description copied from interface: EMap
Returns a set view of the keys of the entries.

Specified by:
keySet in interface EMap<K,V>
Returns:
a set view of the keys of the entries.

map

public java.util.Map<K,V> map()
Description copied from interface: EMap
Returns a map view.

Specified by:
map in interface EMap<K,V>
Returns:
a map view.

values

public java.util.Collection<V> values()
Description copied from interface: EMap
Returns a collection view the values of the entries.

Specified by:
values in interface EMap<K,V>
Returns:
a collection view the values of the entries.

put

public V put(K key,
             V value)
Description copied from interface: EMap
Associates the key with the value and returns the value previously associated with the key, or null. The key, the value, or both may be null. Either the existing entry is updated, or a new entry is added to the end of the list.

Specified by:
put in interface EMap<K,V>
Parameters:
key - the key of the value.
value - the value associated with the key.
Returns:
the value formerly associated with the key, or null.

putAll

public void putAll(EMap<? extends K,? extends V> map)
Description copied from interface: EMap
Puts each Map.Entry of the given map into this one.

Specified by:
putAll in interface EMap<K,V>
Parameters:
map - the map of entries.
See Also:
EMap.put(K, V)

putAll

public void putAll(java.util.Map<? extends K,? extends V> map)
Description copied from interface: EMap
Puts each Map.Entry of the given map into this one.

Specified by:
putAll in interface EMap<K,V>
Parameters:
map - the map of entries.
See Also:
EMap.put(K, V)

removeKey

public V removeKey(java.lang.Object key)
Description copied from interface: EMap
Disassociates the key from its value, and returns the value formerly associated with the key. An entry is removed from the list, if the key is found.

Specified by:
removeKey in interface EMap<K,V>
Parameters:
key - the key of a value.
Returns:
the value formerly associated with the key.


Copyright © 2001-2010 Eclipse Foundation. All Rights Reserved.