Package gnu.kawa.util
Class IdentityHashTable<K,V>
java.lang.Object
java.util.AbstractMap<K,V>
gnu.kawa.util.AbstractHashTable<HashNode<K,V>,K,V>
gnu.kawa.util.GeneralHashTable<K,V>
gnu.kawa.util.IdentityHashTable<K,V>
- All Implemented Interfaces:
Map<K,
V>
A hash table where "equals" is object identity.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,
V>, AbstractMap.SimpleImmutableEntry<K, V> -
Field Summary
Fields inherited from class gnu.kawa.util.AbstractHashTable
DEFAULT_INITIAL_SIZE, mask, num_bindings, table
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class gnu.kawa.util.GeneralHashTable
allocEntries, getEntryHashCode, getEntryNext, getNode, makeEntry, setEntryNext
Methods inherited from class gnu.kawa.util.AbstractHashTable
clear, entrySet, get, get, getOrDefault, hashToIndex, matches, put, put, rehash, remove, 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
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
IdentityHashTable
public IdentityHashTable() -
IdentityHashTable
public IdentityHashTable(int capacity)
-
-
Method Details
-
hash
Description copied from class:AbstractHashTable
Calculate hash code of a key. -
matches
Description copied from class:AbstractHashTable
Compare two keys for equivalence. Override this and theAbstractHashTable.hash(Object)
method if you want a different equivalence relation.
-