org.eclipse.emf.common.util
Class ECollections.EmptyUnmodifiableEMap

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

private static class ECollections.EmptyUnmodifiableEMap
extends ECollections.BasicEmptyUnmodifiableEList<java.util.Map.Entry<java.lang.Object,java.lang.Object>>
implements EMap<java.lang.Object,java.lang.Object>


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.emf.common.util.EMap
EMap.InternalMapView<K,V>
 
Field Summary
 
Fields inherited from class org.eclipse.emf.common.util.ECollections.BasicEmptyUnmodifiableEList
listIterator
 
Constructor Summary
private ECollections.EmptyUnmodifiableEMap()
           
 
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<java.lang.Object,java.lang.Object>> entrySet()
          Returns a set view of the entries.
 java.lang.Object 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<java.lang.Object> keySet()
          Returns a set view of the keys of the entries.
 java.util.Map<java.lang.Object,java.lang.Object> map()
          Returns a map view.
 java.lang.Object put(java.lang.Object key, java.lang.Object value)
          Associates the key with the value and returns the value previously associated with the key, or null.
 void putAll(EMap<? extends java.lang.Object,? extends java.lang.Object> map)
          Puts each Map.Entry of the given map into this one.
 void putAll(java.util.Map<? extends java.lang.Object,? extends java.lang.Object> map)
          Puts each Map.Entry of the given map into this one.
 java.lang.Object removeKey(java.lang.Object key)
          Disassociates the key from its value, and returns the value formerly associated with the key.
 java.util.Collection<java.lang.Object> values()
          Returns a collection view the values of the entries.
 
Methods inherited from class org.eclipse.emf.common.util.ECollections.BasicEmptyUnmodifiableEList
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, equals, 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
 

Constructor Detail

ECollections.EmptyUnmodifiableEMap

private ECollections.EmptyUnmodifiableEMap()
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<java.lang.Object,java.lang.Object>
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<java.lang.Object,java.lang.Object>
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<java.lang.Object,java.lang.Object>> entrySet()
Description copied from interface: EMap
Returns a set view of the entries.

Specified by:
entrySet in interface EMap<java.lang.Object,java.lang.Object>
Returns:
a set view of the entries.

get

public java.lang.Object 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<java.lang.Object,java.lang.Object>
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<java.lang.Object,java.lang.Object>
Parameters:
key - a key.
Returns:
the index of the entry with the given key.

keySet

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

Specified by:
keySet in interface EMap<java.lang.Object,java.lang.Object>
Returns:
a set view of the keys of the entries.

map

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

Specified by:
map in interface EMap<java.lang.Object,java.lang.Object>
Returns:
a map view.

values

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

Specified by:
values in interface EMap<java.lang.Object,java.lang.Object>
Returns:
a collection view the values of the entries.

put

public java.lang.Object put(java.lang.Object key,
                            java.lang.Object 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<java.lang.Object,java.lang.Object>
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 java.lang.Object,? extends java.lang.Object> map)
Description copied from interface: EMap
Puts each Map.Entry of the given map into this one.

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

putAll

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

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

removeKey

public java.lang.Object 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<java.lang.Object,java.lang.Object>
Parameters:
key - the key of a value.
Returns:
the value formerly associated with the key.


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