public class WeakIdentityHashMap<K,V> extends AbstractHashTable<WeakHashNode<K,V>,K,V>
DEFAULT_INITIAL_SIZE, mask, num_bindings, table| Constructor and Description |
|---|
WeakIdentityHashMap() |
WeakIdentityHashMap(int capacity) |
| Modifier and Type | Method and Description |
|---|---|
protected WeakHashNode<K,V>[] |
allocEntries(int n)
Allocate Entry[n].
|
V |
get(java.lang.Object key,
V defaultValue)
Find value for given key.
|
protected int |
getEntryHashCode(WeakHashNode<K,V> entry)
Extract hash-code from Entry.
|
protected WeakHashNode<K,V> |
getEntryNext(WeakHashNode<K,V> entry)
Extract next Entry in same hash-bucket.
|
int |
hash(java.lang.Object key)
Calculate hash code of a key.
|
protected WeakHashNode<K,V> |
makeEntry(K key,
int hash,
V value)
Allocate a new node in the hash table.
|
protected boolean |
matches(K key1,
java.lang.Object key2)
Compare two keys for equivalence.
|
V |
put(K key,
int hash,
V value) |
V |
remove(java.lang.Object key) |
protected void |
setEntryNext(WeakHashNode<K,V> entry,
WeakHashNode<K,V> next)
Set next Entry in same hash-bucket.
|
clear, entrySet, get, getNode, hashToIndex, matches, put, rehash, sizeclone, containsKey, containsValue, equals, hashCode, isEmpty, keySet, putAll, toString, valuespublic WeakIdentityHashMap()
public WeakIdentityHashMap(int capacity)
protected int getEntryHashCode(WeakHashNode<K,V> entry)
AbstractHashTablegetEntryHashCode in class AbstractHashTable<WeakHashNode<K,V>,K,V>protected WeakHashNode<K,V> getEntryNext(WeakHashNode<K,V> entry)
AbstractHashTablegetEntryNext in class AbstractHashTable<WeakHashNode<K,V>,K,V>protected void setEntryNext(WeakHashNode<K,V> entry, WeakHashNode<K,V> next)
AbstractHashTablesetEntryNext in class AbstractHashTable<WeakHashNode<K,V>,K,V>protected WeakHashNode<K,V>[] allocEntries(int n)
AbstractHashTableallocEntries in class AbstractHashTable<WeakHashNode<K,V>,K,V>public int hash(java.lang.Object key)
AbstractHashTablehash in class AbstractHashTable<WeakHashNode<K,V>,K,V>protected boolean matches(K key1, java.lang.Object key2)
AbstractHashTableAbstractHashTable.hash(Object) method if you want
a different equivalence relation.matches in class AbstractHashTable<WeakHashNode<K,V>,K,V>protected WeakHashNode<K,V> makeEntry(K key, int hash, V value)
AbstractHashTablemakeEntry in class AbstractHashTable<WeakHashNode<K,V>,K,V>public V get(java.lang.Object key, V defaultValue)
AbstractHashTableget in class AbstractHashTable<WeakHashNode<K,V>,K,V>public V put(K key, int hash, V value)
put in class AbstractHashTable<WeakHashNode<K,V>,K,V>public V remove(java.lang.Object key)
remove in interface java.util.Map<K,V>remove in class AbstractHashTable<WeakHashNode<K,V>,K,V>