Package jetbrains.buildServer.util
Class SoftValueHashMap<K,V>
- java.lang.Object
-
- jetbrains.buildServer.util.SoftValueHashMap<K,V>
-
- All Implemented Interfaces:
java.util.Map<K,V>
public class SoftValueHashMap<K,V> extends java.lang.Object implements java.util.Map<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 void
afterPut(K key, V val)
protected void
afterRemove(K key, V val)
void
clear()
void
compactIfNecessary(int capacityToSizeMultiplier)
Compacts internal map if its current capacity exceeds size in capacityToSizeMultiplier timesboolean
containsKey(java.lang.Object key)
boolean
containsValue(java.lang.Object value)
java.util.Set<java.util.Map.Entry<K,V>>
entrySet()
void
forEachValue(ItemProcessor<V> processor)
V
get(java.lang.Object key)
boolean
isEmpty()
java.util.Set<K>
keySet()
V
put(K key, V value)
void
putAll(java.util.Map<? extends K,? extends V> t)
V
remove(java.lang.Object key)
int
size()
java.util.Collection<V>
values()
-
-
-
Method Detail
-
containsKey
public boolean containsKey(java.lang.Object key)
-
containsValue
public boolean containsValue(java.lang.Object value)
-
keySet
@NotNull public java.util.Set<K> keySet()
-
values
@NotNull public java.util.Collection<V> values()
-
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
-
-