Package org.apache.commons.collections4
Class SplitMapUtils.WrappedGet<K,V>
java.lang.Object
org.apache.commons.collections4.SplitMapUtils.WrappedGet<K,V>
- All Implemented Interfaces:
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 Object
implements IterableMap<K,V>, Unmodifiable
-
Nested Class Summary
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()booleancontainsKey(Object key) booleancontainsValue(Object value) entrySet()booleaninthashCode()booleanisEmpty()keySet()Obtains aMapIteratorover the map.Note that the return type is Object, rather than V as in the Map interface.voidintsize()values()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Field Details
-
get
-
-
Constructor Details
-
WrappedGet
-
-
Method Details
-
clear
public void clear() -
containsKey
- Specified by:
containsKeyin interfaceGet<K,V> - Specified by:
containsKeyin interfaceMap<K,V> - Parameters:
key- key whose presence in this map is to be tested- Returns:
trueif this map contains a mapping for the specified key- See Also:
-
containsValue
- Specified by:
containsValuein interfaceGet<K,V> - Specified by:
containsValuein interfaceMap<K,V> - Parameters:
value- value whose presence in this map is to be tested- Returns:
trueif this map maps one or more keys to the specified value- See Also:
-
entrySet
-
equals
-
get
-
hashCode
public int hashCode() -
isEmpty
public boolean isEmpty() -
keySet
-
put
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 interfaceMap<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:
-
putAll
-
remove
-
size
public int size() -
values
-
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
-