Package com.ibm.wala.util.collections
Class BimodalMap<K,V>
java.lang.Object
com.ibm.wala.util.collections.BimodalMap<K,V>
- All Implemented Interfaces:
Map<K,V>
This implementation of
Map chooses between one of two implementations, depending on the size of the map.-
Nested Class Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()booleancontainsKey(Object key) booleancontainsValue(Object value) entrySet()booleanisEmpty()keySet()voidintsize()values()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
BimodalMap
public BimodalMap(int cutoff) - Parameters:
cutoff- the map size at which to switch from the small map implementation to the large map implementation
-
-
Method Details
-
size
public int size() -
isEmpty
public boolean isEmpty() -
containsKey
- Specified by:
containsKeyin interfaceMap<K,V>
-
containsValue
- Specified by:
containsValuein interfaceMap<K,V>
-
get
-
put
-
remove
- Specified by:
removein interfaceMap<K,V> - Throws:
UnsupportedOperationException- if the backingStore doesn't support remove
-
putAll
- Specified by:
putAllin interfaceMap<K,V> - Throws:
UnsupportedOperationException
-
clear
public void clear() -
keySet
-
values
-
entrySet
- Specified by:
entrySetin interfaceMap<K,V> - Throws:
UnimplementedError- if the backingStore implementation does
-