private static class SplitMapUtils.WrappedGet<K,V> extends java.lang.Object implements IterableMap<K,V>, Unmodifiable
| Modifier | Constructor and Description |
|---|---|
private |
WrappedGet(Get<K,V> get) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
boolean |
containsKey(java.lang.Object key) |
boolean |
containsValue(java.lang.Object value) |
java.util.Set<java.util.Map.Entry<K,V>> |
entrySet() |
boolean |
equals(java.lang.Object arg0) |
V |
get(java.lang.Object key) |
int |
hashCode() |
boolean |
isEmpty() |
java.util.Set<K> |
keySet() |
MapIterator<K,V> |
mapIterator()
Obtains a
MapIterator over the map. |
V |
put(K key,
V value)
Note that the return type is Object, rather than V as in the Map interface.
|
void |
putAll(java.util.Map<? extends K,? extends V> t) |
V |
remove(java.lang.Object key) |
int |
size() |
java.util.Collection<V> |
values() |
public void clear()
public boolean containsKey(java.lang.Object key)
public boolean containsValue(java.lang.Object value)
public boolean equals(java.lang.Object arg0)
public V get(java.lang.Object key)
public int hashCode()
public boolean isEmpty()
public java.util.Set<K> keySet()
public V put(K key, V value)
Putput in interface java.util.Map<K,V>put in interface Put<K,V>key - key with which the specified value is to be associatedvalue - value to be associated with the specified keykey, or
null if there was no mapping for key.
(A null return can also indicate that the map
previously associated null with key,
if the implementation supports null values.)Map.put(Object, Object)public V remove(java.lang.Object key)
public int size()
public java.util.Collection<V> values()
public MapIterator<K,V> mapIterator()
IterableGetMapIterator over the map.
A map iterator is an efficient way of iterating over maps. There is no need to access the entry set or use Map Entry objects.
IterableMap<String,Integer> map = new HashedMap<String,Integer>();
MapIterator<String,Integer> it = map.mapIterator();
while (it.hasNext()) {
String key = it.next();
Integer value = it.getValue();
it.setValue(value + 1);
}
mapIterator in interface IterableGet<K,V>