Package jetbrains.buildServer.util
Class SoftValueHashMap<K,V>
- java.lang.Object
-
- jetbrains.buildServer.util.SoftValueHashMap<K,V>
-
-
Constructor Summary
Constructors Constructor Description SoftValueHashMap()SoftValueHashMap(int initialCapacity, float loadFactor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidafterPut(K key, V val)protected voidafterRemove(K key, V val)voidclear()voidcompactIfNecessary(int capacityToSizeMultiplier)Compacts internal map if its current capacity exceeds size in capacityToSizeMultiplier timesbooleancontainsKey(Object key)booleancontainsValue(Object value)Set<Map.Entry<K,V>>entrySet()voidforEachValue(ItemProcessor<V> processor)Vget(Object key)booleanisEmpty()Set<K>keySet()Vput(K key, V value)voidputAll(Map<? extends K,? extends V> t)Vremove(Object key)intsize()Collection<V>values()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
-
-
Method Detail
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKeyin interfaceMap<K,V>
-
containsValue
public boolean containsValue(Object value)
- Specified by:
containsValuein interfaceMap<K,V>
-
forEachValue
public void forEachValue(@NotNull ItemProcessor<V> processor)
-
compactIfNecessary
public void compactIfNecessary(int capacityToSizeMultiplier)
Compacts internal map if its current capacity exceeds size in capacityToSizeMultiplier times- Parameters:
capacityToSizeMultiplier- if capacity exceeds size() multiplied by capacityToSizeMultiplier, then compaction must be performed.- Since:
- 2019.2
-
-