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 class
IntObjectCache.CacheEntry<T>
static interface
IntObjectCache.DeletedPairsListener
protected class
IntObjectCache.IntObjectCacheIterator
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_SIZE
static int
MIN_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 void
addDeletedPairsListener(IntObjectCache.DeletedPairsListener listener)
void
cacheObject(int key, T x)
boolean
containsKey(int key)
int
count()
T
get(int key)
protected static int
getAdjustedTableSize(int candidate)
double
hitRate()
boolean
isCached(int key)
boolean
isEmpty()
Iterator<T>
iterator()
T
put(int key, T value)
void
remove(int key)
void
removeAll()
void
removeDeletedPairsListener(IntObjectCache.DeletedPairsListener listener)
void
resize(int newSize)
int
size()
T
tryKey(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)
-
-