|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface EMap<K,V>
A list of java.util.Map.Entry
instances, i.e., entries, that
supports a map()
view
as well as the full Map
API,
with the notable exception of Map.remove(Object)
.
It's return type conflicts with that of Collection.remove(Object)
.
The removeKey(Object)
method may be used instead.
The implementation of remove may delegate to removeKey
for an object that is not an instance of Map.Entry
.
Nested Class Summary | |
---|---|
static interface |
EMap.InternalMapView<K,V>
An internal interface implemented by the map view . |
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 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 |
Method Detail |
---|
V get(java.lang.Object key)
null
.
key
- the key of the value.
V put(K key, V value)
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.
key
- the key of the value.value
- the value associated with the key.
null
.void putAll(java.util.Map<? extends K,? extends V> map)
Map.Entry
of the given map into this one.
map
- the map of entries.put(K, V)
void putAll(EMap<? extends K,? extends V> map)
Map.Entry
of the given map into this one.
map
- the map of entries.put(K, V)
int indexOfKey(java.lang.Object key)
-1
, if there is no such entry.
key
- a key.
boolean containsKey(java.lang.Object key)
key
- a key associated with a value.
boolean containsValue(java.lang.Object value)
value
- a value associated with a key.
V removeKey(java.lang.Object key)
key
- the key of a value.
java.util.Map<K,V> map()
java.util.Set<java.util.Map.Entry<K,V>> entrySet()
java.util.Set<K> keySet()
java.util.Collection<V> values()
|
Copyright 2001-2006 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |