return this; final int slot = slot(hash6); final Object previousValue = subNodes[slot]; if (previousValue instanceof Node) {
@Override V get(Object key, int hash) { final int hash6 = hash & HASH_MASK; if (!exists(hash6)) { return null; } final int slot = slot(hash6); final Object sub = subNodes[slot]; assert sub != null; if (sub instanceof Node) { assert keys[slot] == null; // keys don't make sense on inner nodes @SuppressWarnings("unchecked") final Node<K, V> subNode = (Node<K, V>) sub; return subNode.get(key, hash >>> HASH_BITS); } else { if (keys[slot].equals(key)) { @SuppressWarnings("unchecked") final V v = (V) sub; return v; } else { // we have an entry for this hash, but the value is different return null; } } }
return this; final int slot = slot(hash6); final Object previousValue = subNodes[slot]; if (previousValue instanceof Node) {
return this; final int slot = slot(hash6); final Object previousValue = subNodes[slot]; if (previousValue instanceof Node) {
@Override V get(Object key, int hash) { final int hash6 = hash & HASH_MASK; if (!exists(hash6)) { return null; } final int slot = slot(hash6); final Object sub = subNodes[slot]; assert sub != null; if (sub instanceof Node) { assert keys[slot] == null; // keys don't make sense on inner nodes @SuppressWarnings("unchecked") final Node<K, V> subNode = (Node<K, V>) sub; return subNode.get(key, hash >>> HASH_BITS); } else { if (keys[slot].equals(key)) { @SuppressWarnings("unchecked") final V v = (V) sub; return v; } else { // we have an entry for this hash, but the value is different return null; } } }
return this; final int slot = slot(hash6); final Object previousValue = subNodes[slot]; if (previousValue instanceof Node) {
@Override V get(Object key, int hash) { final int hash6 = hash & HASH_MASK; if (!exists(hash6)) { return null; } final int slot = slot(hash6); final Object sub = subNodes[slot]; assert sub != null; if (sub instanceof Node) { assert keys[slot] == null; // keys don't make sense on inner nodes @SuppressWarnings("unchecked") final Node<K, V> subNode = (Node<K, V>) sub; return subNode.get(key, hash >>> HASH_BITS); } else { if (keys[slot].equals(key)) { @SuppressWarnings("unchecked") final V v = (V) sub; return v; } else { // we have an entry for this hash, but the value is different return null; } } }
return this; final int slot = slot(hash6); final Object previousValue = subNodes[slot]; if (previousValue instanceof Node) {
@Override V get(Object key, int hash) { final int hash6 = hash & HASH_MASK; if (!exists(hash6)) { return null; } final int slot = slot(hash6); final Object sub = subNodes[slot]; assert sub != null; if (sub instanceof Node) { assert keys[slot] == null; // keys don't make sense on inner nodes @SuppressWarnings("unchecked") final Node<K, V> subNode = (Node<K, V>) sub; return subNode.get(key, hash >>> HASH_BITS); } else { if (keys[slot].equals(key)) { @SuppressWarnings("unchecked") final V v = (V) sub; return v; } else { // we have an entry for this hash, but the value is different return null; } } }
@Override V get(Object key, int hash) { final int hash6 = hash & HASH_MASK; if (!exists(hash6)) { return null; } final int slot = slot(hash6); final Object sub = subNodes[slot]; assert sub != null; if (sub instanceof Node) { assert keys[slot] == null; // keys don't make sense on inner nodes @SuppressWarnings("unchecked") final Node<K, V> subNode = (Node<K, V>) sub; return subNode.get(key, hash >>> HASH_BITS); } else { if (keys[slot].equals(key)) { @SuppressWarnings("unchecked") final V v = (V) sub; return v; } else { // we have an entry for this hash, but the value is different return null; } } }
@Override InnerNode<K, V> put(K key, int hash, int hashBits, V value, MutableValueInt newValue) { final int hash6 = hash & HASH_MASK; final int slot = slot(hash6); if (exists(hash6)) { hash >>>= HASH_BITS; hashBits -= HASH_BITS; return putExisting(key, hash, hashBits, slot, value, newValue); } else { newValue.value = 1; return putNew(key, hash6, slot, value); } }
@Override InnerNode<K, V> put(K key, int hash, int hashBits, V value, MutableValueInt newValue) { final int hash6 = hash & HASH_MASK; final int slot = slot(hash6); if (exists(hash6)) { hash >>>= HASH_BITS; hashBits -= HASH_BITS; return putExisting(key, hash, hashBits, slot, value, newValue); } else { newValue.value = 1; return putNew(key, hash6, slot, value); } }
@Override InnerNode<K, V> put(K key, int hash, int hashBits, V value, MutableValueInt newValue) { final int hash6 = hash & HASH_MASK; final int slot = slot(hash6); if (exists(hash6)) { hash >>>= HASH_BITS; hashBits -= HASH_BITS; return putExisting(key, hash, hashBits, slot, value, newValue); } else { newValue.value = 1; return putNew(key, hash6, slot, value); } }
@Override InnerNode<K, V> put(K key, int hash, int hashBits, V value, MutableValueInt newValue) { final int hash6 = hash & HASH_MASK; final int slot = slot(hash6); if (exists(hash6)) { hash >>>= HASH_BITS; hashBits -= HASH_BITS; return putExisting(key, hash, hashBits, slot, value, newValue); } else { newValue.value = 1; return putNew(key, hash6, slot, value); } }
@Override InnerNode<K, V> put(K key, int hash, int hashBits, V value, MutableValueInt newValue) { final int hash6 = hash & HASH_MASK; final int slot = slot(hash6); if (exists(hash6)) { hash >>>= HASH_BITS; hashBits -= HASH_BITS; return putExisting(key, hash, hashBits, slot, value, newValue); } else { newValue.value = 1; return putNew(key, hash6, slot, value); } }