|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractMap<K,V>
gnu.kawa.util.AbstractHashTable<WeakHashNode<K,V>,K,V>
gnu.kawa.util.WeakIdentityHashMap<K,V>
public class WeakIdentityHashMap<K,V>
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.util.AbstractMap |
---|
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V> |
Nested classes/interfaces inherited from interface java.util.Map |
---|
java.util.Map.Entry<K,V> |
Field Summary |
---|
Fields inherited from class gnu.kawa.util.AbstractHashTable |
---|
DEFAULT_INITIAL_SIZE, mask, num_bindings, table |
Constructor Summary | |
---|---|
WeakIdentityHashMap()
|
|
WeakIdentityHashMap(int capacity)
|
Method Summary | |
---|---|
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. |
Methods inherited from class gnu.kawa.util.AbstractHashTable |
---|
clear, entrySet, get, getNode, hashToIndex, matches, put, rehash, size |
Methods inherited from class java.util.AbstractMap |
---|
clone, containsKey, containsValue, equals, hashCode, isEmpty, keySet, putAll, toString, values |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public WeakIdentityHashMap()
public WeakIdentityHashMap(int capacity)
Method Detail |
---|
protected int getEntryHashCode(WeakHashNode<K,V> entry)
AbstractHashTable
getEntryHashCode
in class AbstractHashTable<WeakHashNode<K,V>,K,V>
protected WeakHashNode<K,V> getEntryNext(WeakHashNode<K,V> entry)
AbstractHashTable
getEntryNext
in class AbstractHashTable<WeakHashNode<K,V>,K,V>
protected void setEntryNext(WeakHashNode<K,V> entry, WeakHashNode<K,V> next)
AbstractHashTable
setEntryNext
in class AbstractHashTable<WeakHashNode<K,V>,K,V>
protected WeakHashNode<K,V>[] allocEntries(int n)
AbstractHashTable
allocEntries
in class AbstractHashTable<WeakHashNode<K,V>,K,V>
public int hash(java.lang.Object key)
AbstractHashTable
hash
in class AbstractHashTable<WeakHashNode<K,V>,K,V>
protected boolean matches(K key1, java.lang.Object key2)
AbstractHashTable
AbstractHashTable.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)
AbstractHashTable
makeEntry
in class AbstractHashTable<WeakHashNode<K,V>,K,V>
public V get(java.lang.Object key, V defaultValue)
AbstractHashTable
get
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>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |