Package org.apache.commons.collections4
Class SplitMapUtils.WrappedGet<K,V>
- java.lang.Object
-
- org.apache.commons.collections4.SplitMapUtils.WrappedGet<K,V>
-
- All Implemented Interfaces:
java.util.Map<K,V>,Get<K,V>,IterableGet<K,V>,IterableMap<K,V>,Put<K,V>,Unmodifiable
- Enclosing class:
- SplitMapUtils
private static class SplitMapUtils.WrappedGet<K,V> extends java.lang.Object implements IterableMap<K,V>, Unmodifiable
-
-
Constructor Summary
Constructors Modifier Constructor Description privateWrappedGet(Get<K,V> get)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()booleancontainsKey(java.lang.Object key)booleancontainsValue(java.lang.Object value)java.util.Set<java.util.Map.Entry<K,V>>entrySet()booleanequals(java.lang.Object arg0)Vget(java.lang.Object key)inthashCode()booleanisEmpty()java.util.Set<K>keySet()MapIterator<K,V>mapIterator()Obtains aMapIteratorover the map.Vput(K key, V value)Note that the return type is Object, rather than V as in the Map interface.voidputAll(java.util.Map<? extends K,? extends V> t)Vremove(java.lang.Object key)intsize()java.util.Collection<V>values()
-
-
-
Method Detail
-
clear
public void clear()
-
containsKey
public boolean containsKey(java.lang.Object key)
-
containsValue
public boolean containsValue(java.lang.Object value)
-
equals
public boolean equals(java.lang.Object arg0)
-
get
public V get(java.lang.Object key)
-
hashCode
public int hashCode()
-
isEmpty
public boolean isEmpty()
-
keySet
public java.util.Set<K> keySet()
-
put
public V put(K key, V value)
Description copied from interface:PutNote that the return type is Object, rather than V as in the Map interface. See the class Javadoc for further info.- Specified by:
putin interfacejava.util.Map<K,V>- Specified by:
putin interfacePut<K,V>- Parameters:
key- key with which the specified value is to be associatedvalue- value to be associated with the specified key- Returns:
- the previous value associated with
key, ornullif there was no mapping forkey. (Anullreturn can also indicate that the map previously associatednullwithkey, if the implementation supportsnullvalues.) - See Also:
Map.put(Object, Object)
-
remove
public V remove(java.lang.Object key)
-
size
public int size()
-
values
public java.util.Collection<V> values()
-
mapIterator
public MapIterator<K,V> mapIterator()
Description copied from interface:IterableGetObtains aMapIteratorover 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); }- Specified by:
mapIteratorin interfaceIterableGet<K,V>- Returns:
- a map iterator
-
-