Lines Matching defs:hash

87      * The hash table. If this hash map contains a mapping for null, it is
88 * not represented this hash table.
98 * The number of mappings in this hash map.
134 * the initial capacity of this hash map.
166 * the initial capacity of this hash map.
298 int hash = key.hashCode();
299 hash ^= (hash >>> 20) ^ (hash >>> 12);
300 hash ^= (hash >>> 7) ^ (hash >>> 4);
303 for (HashMapEntry<K, V> e = tab[hash & (tab.length - 1)];
306 if (eKey == key || (e.hash == hash && key.equals(eKey))) {
327 int hash = key.hashCode();
328 hash ^= (hash >>> 20) ^ (hash >>> 12);
329 hash ^= (hash >>> 7) ^ (hash >>> 4);
332 for (HashMapEntry<K, V> e = tab[hash & (tab.length - 1)];
335 if (eKey == key || (e.hash == hash && key.equals(eKey))) {
390 int hash = secondaryHash(key.hashCode());
392 int index = hash & (tab.length - 1);
394 if (e.hash == hash && key.equals(e.key)) {
406 index = hash & (tab.length - 1);
408 addNewEntry(key, value, hash, index);
453 int hash = secondaryHash(key.hashCode());
455 int index = hash & (tab.length - 1);
458 if (e.hash == hash && key.equals(e.key)) {
465 tab[index] = constructorNewEntry(key, value, hash, first);
470 * Creates a new entry for the given key, value, hash, and index and
471 * inserts it into the hash table. This method is called by put
472 * (and indirectly, putAll), and overridden by LinkedHashMap. The hash
473 * must incorporate the secondary hash function.
475 void addNewEntry(K key, V value, int hash, int index) {
476 table[index] = new HashMapEntry<K, V>(key, value, hash, table[index]);
481 * inserts it into the hash table. This method is called by put
494 K key, V value, int hash, HashMapEntry<K, V> first) {
495 return new HashMapEntry<K, V>(key, value, hash, first);
512 * Ensures that the hash table has sufficient capacity to store the
540 int newIndex = e.hash & newMask;
563 * Doubles the capacity of the hash table. Existing entries are placed in
589 int highBit = e.hash & oldCapacity;
593 int nextHighBit = n.hash & oldCapacity;
621 int hash = secondaryHash(key.hashCode());
623 int index = hash & (tab.length - 1);
626 if (e.hash == hash && key.equals(e.key)) {
659 * Removes all mappings from this hash map, leaving it empty.
726 final int hash;
729 HashMapEntry(K key, V value, int hash, HashMapEntry<K, V> next) {
732 this.hash = hash;
841 int hash = secondaryHash(key.hashCode());
843 int index = hash & (tab.length - 1);
845 if (e.hash == hash && key.equals(e.key)) {
869 int hash = secondaryHash(key.hashCode());
871 int index = hash & (tab.length - 1);
874 if (e.hash == hash && key.equals(e.key)) {
966 * Applies a supplemental hash function to a given hashCode, which defends
967 * against poor quality hash functions. This is critical because HashMap
968 * uses power-of-two length hash tables, that otherwise encounter collisions
972 // Doug Lea's supplemental hash function