Package com.mycila.xmltool
Class SoftHashMap<K,V>
java.lang.Object
java.util.AbstractMap<K,V>
com.mycila.xmltool.SoftHashMap<K,V>
- All Implemented Interfaces:
Map<K,V>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classprivate classprivate classprivate classprivate classprivate classprivate static classprivate classprivate classNested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleImmutableEntry<K,V> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate static final floatprivate final floatprivate static final intprivate intprivate static final Objectprivate final ReferenceQueue<K> private intprivate SoftHashMap.Entry<K,V>[] private intprivate Collection<V> -
Constructor Summary
ConstructorsConstructorDescriptionSoftHashMap(int initialCapacity) SoftHashMap(int initialCapacity, float loadFactor) SoftHashMap(Map<? extends K, ? extends V> t) -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()booleancontainsKey(Object key) private booleanbooleancontainsValue(Object value) entrySet()private static booleanprivate voidprivate SoftHashMap.Entry<K, V> private SoftHashMap.Entry<K,V>[] getTable()private static inthash(int h) private static intprivate static intindexFor(int h, int length) booleanisEmpty()keySet()private static <K> Kvoidprivate SoftHashMap.Entry<K, V> private voidresize(int newCapacity) intsize()private voidtransfer(SoftHashMap.Entry<K, V>[] src, SoftHashMap.Entry<K, V>[] dest) private static <K> KunmaskNull(Object key) values()Methods inherited from class java.util.AbstractMap
clone, equals, hashCode, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Field Details
-
DEFAULT_INITIAL_CAPACITY
private static final int DEFAULT_INITIAL_CAPACITY- See Also:
-
MAXIMUM_CAPACITY
private static final int MAXIMUM_CAPACITY- See Also:
-
DEFAULT_LOAD_FACTOR
private static final float DEFAULT_LOAD_FACTOR- See Also:
-
NULL_KEY
-
table
-
size
private int size -
threshold
private int threshold -
loadFactor
private final float loadFactor -
queue
-
modCount
private volatile int modCount -
entrySet
-
keySet
-
values
-
-
Constructor Details
-
SoftHashMap
public SoftHashMap(int initialCapacity, float loadFactor) -
SoftHashMap
public SoftHashMap(int initialCapacity) -
SoftHashMap
public SoftHashMap() -
SoftHashMap
-
-
Method Details
-
size
public int size() -
isEmpty
public boolean isEmpty() -
get
-
put
-
containsKey
- Specified by:
containsKeyin interfaceMap<K,V> - Overrides:
containsKeyin classAbstractMap<K,V>
-
putAll
-
remove
-
clear
public void clear() -
containsValue
- Specified by:
containsValuein interfaceMap<K,V> - Overrides:
containsValuein classAbstractMap<K,V>
-
keySet
-
values
-
entrySet
-
expungeStaleEntries
private void expungeStaleEntries() -
getTable
-
getEntry
-
resize
private void resize(int newCapacity) -
transfer
-
removeMapping
-
containsNullValue
private boolean containsNullValue() -
maskNull
-
unmaskNull
-
eq
-
indexFor
private static int indexFor(int h, int length) -
hash
-
hash
private static int hash(int h)
-