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 final 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()Removes all of the mappings from this map.booleancontainsKey(Object key) Tests for presence of a given key.booleancontainsValue(Object value) Tests for presence of a given value.entrySet()Gets a set view of the mappings contained in this map.booleanGets a value at a given key.inthashCode()booleanisEmpty()Tests whether this instance contains any key-value mappings.keySet()Gets a view of the keys contained in this map.Obtains aMapIteratorover the map.Associates the specified value with the specified key in this map.voidCopies all of the mappings from the specified map to this map.Remove a key-value mappings.intsize()Gets the number of key-value mappings in this map.values()Gets a a collection view of the values contained in this map.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()Description copied from interface:PutRemoves all of the mappings from this map. -
containsKey
Description copied from interface:GetTests for presence of a given key.- 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
Description copied from interface:GetTests for presence of a given value.- 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
Description copied from interface:GetGets a set view of the mappings contained in this map. -
equals
-
get
Description copied from interface:GetGets a value at a given key. -
hashCode
public int hashCode() -
isEmpty
public boolean isEmpty()Description copied from interface:GetTests whether this instance contains any key-value mappings. -
keySet
Description copied from interface:GetGets a view of the keys contained in this map. -
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
-
put
Description copied from interface:PutAssociates the specified value with the specified key in this map.Note 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
Description copied from interface:PutCopies all of the mappings from the specified map to this map. -
remove
Description copied from interface:GetRemove a key-value mappings. -
size
public int size()Description copied from interface:GetGets the number of key-value mappings in this map. -
values
Description copied from interface:GetGets a a collection view of the values contained in this map.
-