|
|||||||||
PREV CLASS SOURCE NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 noteable 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
.
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 |
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 |
keySet()
Returns a set view of the keys of the entries. |
java.util.Map |
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(java.util.Map 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 |
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 |
public java.lang.Object get(java.lang.Object key)
null
.key
- the key of the value.public java.lang.Object put(java.lang.Object key, java.lang.Object 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
.public void putAll(java.util.Map map)
Map.Entry
of the given map into this one.map
- the map of entries.put(java.lang.Object, java.lang.Object)
public int indexOfKey(java.lang.Object key)
-1
, if there is no such entry.key
- a key.public boolean containsKey(java.lang.Object key)
key
- a key associated with a value.public boolean containsValue(java.lang.Object value)
value
- a value associated with a key.public java.lang.Object removeKey(java.lang.Object key)
key
- the key of a value.public java.util.Map map()
public java.util.Set entrySet()
public java.util.Set keySet()
public java.util.Collection values()
|
Copyright 2001-2003 IBM Corporation and others. All Rights Reserved. |
||||||||
PREV CLASS SOURCE NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |