Package com.intellij.util.containers
Class IntObjectCache<T>
- java.lang.Object
-
- com.intellij.util.containers.IntObjectCache<T>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classIntObjectCache.CacheEntry<T>static interfaceIntObjectCache.DeletedPairsListenerprotected classIntObjectCache.IntObjectCacheIterator
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_SIZEstatic intMIN_SIZE
-
Constructor Summary
Constructors Constructor Description IntObjectCache()IntObjectCache(int cacheSize)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDeletedPairsListener(IntObjectCache.DeletedPairsListener listener)voidcacheObject(int key, T x)booleancontainsKey(int key)intcount()Tget(int key)protected static intgetAdjustedTableSize(int candidate)doublehitRate()booleanisCached(int key)booleanisEmpty()Iterator<T>iterator()Tput(int key, T value)voidremove(int key)voidremoveAll()voidremoveDeletedPairsListener(IntObjectCache.DeletedPairsListener listener)voidresize(int newSize)intsize()TtryKey(int key)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Field Detail
-
DEFAULT_SIZE
public static final int DEFAULT_SIZE
- See Also:
- Constant Field Values
-
MIN_SIZE
public static final int MIN_SIZE
- See Also:
- Constant Field Values
-
-
Method Detail
-
isEmpty
public boolean isEmpty()
-
containsKey
public boolean containsKey(int key)
-
get
public T get(int key)
-
remove
public void remove(int key)
-
removeAll
public void removeAll()
-
cacheObject
public final void cacheObject(int key, T x)
-
tryKey
public final T tryKey(int key)
-
isCached
public final boolean isCached(int key)
-
count
public int count()
-
size
public int size()
-
resize
public void resize(int newSize)
-
hitRate
public double hitRate()
-
addDeletedPairsListener
public void addDeletedPairsListener(IntObjectCache.DeletedPairsListener listener)
-
removeDeletedPairsListener
public void removeDeletedPairsListener(IntObjectCache.DeletedPairsListener listener)
-
getAdjustedTableSize
protected static int getAdjustedTableSize(int candidate)
-
-