protected void rehash() { int oldCapacity = table.length; LongIntLinkedEntry oldMap[] = table; int newCapacity = oldCapacity * 2 + 1; LongIntLinkedEntry newMap[] = new LongIntLinkedEntry[newCapacity]; threshold = (int) (newCapacity * loadFactor); table = newMap; for (int i = oldCapacity; i-- > 0;) { LongIntLinkedEntry old = oldMap[i]; while (old != null) { LongIntLinkedEntry e = old; old = old.hash_next; long key = e.key; int index = hash(key) % newCapacity; e.hash_next = newMap[index]; newMap[index] = e; } } }
protected void rehash() { int oldCapacity = table.length; LongIntLinkedEntry oldMap[] = table; int newCapacity = oldCapacity * 2 + 1; LongIntLinkedEntry newMap[] = new LongIntLinkedEntry[newCapacity]; threshold = (int) (newCapacity * loadFactor); table = newMap; for (int i = oldCapacity; i-- > 0;) { LongIntLinkedEntry old = oldMap[i]; while (old != null) { LongIntLinkedEntry e = old; old = old.hash_next; long key = e.key; int index = hash(key) % newCapacity; e.hash_next = newMap[index]; newMap[index] = e; } } }
protected void rehash() { int oldCapacity = table.length; LongIntLinkedEntry oldMap[] = table; int newCapacity = oldCapacity * 2 + 1; LongIntLinkedEntry newMap[] = new LongIntLinkedEntry[newCapacity]; threshold = (int) (newCapacity * loadFactor); table = newMap; for (int i = oldCapacity; i-- > 0;) { LongIntLinkedEntry old = oldMap[i]; while (old != null) { LongIntLinkedEntry e = old; old = old.hash_next; long key = e.key; int index = hash(key) % newCapacity; e.hash_next = newMap[index]; newMap[index] = e; } } }
protected void rehash() { int oldCapacity = table.length; LongIntLinkedEntry oldMap[] = table; int newCapacity = oldCapacity * 2 + 1; LongIntLinkedEntry newMap[] = new LongIntLinkedEntry[newCapacity]; threshold = (int) (newCapacity * loadFactor); table = newMap; for (int i = oldCapacity; i-- > 0;) { LongIntLinkedEntry old = oldMap[i]; while (old != null) { LongIntLinkedEntry e = old; old = old.hash_next; long key = e.key; int index = hash(key) % newCapacity; e.hash_next = newMap[index]; newMap[index] = e; } } }
protected void rehash() { int oldCapacity = table.length; LongIntLinkedEntry oldMap[] = table; int newCapacity = oldCapacity * 2 + 1; LongIntLinkedEntry newMap[] = new LongIntLinkedEntry[newCapacity]; threshold = (int) (newCapacity * loadFactor); table = newMap; for (int i = oldCapacity; i-- > 0;) { LongIntLinkedEntry old = oldMap[i]; while (old != null) { LongIntLinkedEntry e = old; old = old.hash_next; long key = e.key; int index = hash(key) % newCapacity; e.hash_next = newMap[index]; newMap[index] = e; } } }
public synchronized boolean containsKey(long key) { LongIntLinkedEntry tab[] = table; int index = hash(key) % tab.length; LongIntLinkedEntry e = tab[index]; while (e != null) { if (CompareUtil.equals(e.key, key)) { return true; } e = e.hash_next; } return false; }
public synchronized int get(long key) { LongIntLinkedEntry tab[] = table; int index = hash(key) % tab.length; for (LongIntLinkedEntry e = tab[index]; e != null; e = e.hash_next) { if (CompareUtil.equals(e.key, key)) { return e.value; } } return NONE; }
public synchronized boolean containsKey(long key) { LongIntLinkedEntry tab[] = table; int index = hash(key) % tab.length; LongIntLinkedEntry e = tab[index]; while (e != null) { if (CompareUtil.equals(e.key, key)) { return true; } e = e.hash_next; } return false; }
public synchronized boolean containsKey(long key) { LongIntLinkedEntry tab[] = table; int index = hash(key) % tab.length; LongIntLinkedEntry e = tab[index]; while (e != null) { if (CompareUtil.equals(e.key, key)) { return true; } e = e.hash_next; } return false; }
public synchronized int get(long key) { LongIntLinkedEntry tab[] = table; int index = hash(key) % tab.length; for (LongIntLinkedEntry e = tab[index]; e != null; e = e.hash_next) { if (CompareUtil.equals(e.key, key)) { return e.value; } } return NONE; }
public synchronized boolean containsKey(long key) { LongIntLinkedEntry tab[] = table; int index = hash(key) % tab.length; LongIntLinkedEntry e = tab[index]; while (e != null) { if (CompareUtil.equals(e.key, key)) { return true; } e = e.hash_next; } return false; }
public synchronized int get(long key) { LongIntLinkedEntry tab[] = table; int index = hash(key) % tab.length; for (LongIntLinkedEntry e = tab[index]; e != null; e = e.hash_next) { if (CompareUtil.equals(e.key, key)) { return e.value; } } return NONE; }
public synchronized int get(long key) { LongIntLinkedEntry tab[] = table; int index = hash(key) % tab.length; for (LongIntLinkedEntry e = tab[index]; e != null; e = e.hash_next) { if (CompareUtil.equals(e.key, key)) { return e.value; } } return NONE; }
public synchronized int get(long key) { LongIntLinkedEntry tab[] = table; int index = hash(key) % tab.length; for (LongIntLinkedEntry e = tab[index]; e != null; e = e.hash_next) { if (CompareUtil.equals(e.key, key)) { return e.value; } } return NONE; }
public synchronized boolean containsKey(long key) { LongIntLinkedEntry tab[] = table; int index = hash(key) % tab.length; LongIntLinkedEntry e = tab[index]; while (e != null) { if (CompareUtil.equals(e.key, key)) { return true; } e = e.hash_next; } return false; }
public synchronized int remove(long key) { LongIntLinkedEntry tab[] = table; int index = hash(key) % tab.length; LongIntLinkedEntry e = tab[index]; LongIntLinkedEntry prev = null; while (e != null) { if (CompareUtil.equals(e.key, key)) { if (prev != null) { prev.hash_next = e.hash_next; } else { tab[index] = e.hash_next; } count--; int oldValue = e.value; e.value = NONE; // unchain(e); return oldValue; } prev = e; e = e.hash_next; } return NONE; }
public synchronized int remove(long key) { LongIntLinkedEntry tab[] = table; int index = hash(key) % tab.length; LongIntLinkedEntry e = tab[index]; LongIntLinkedEntry prev = null; while (e != null) { if (CompareUtil.equals(e.key, key)) { if (prev != null) { prev.hash_next = e.hash_next; } else { tab[index] = e.hash_next; } count--; int oldValue = e.value; e.value = NONE; // unchain(e); return oldValue; } prev = e; e = e.hash_next; } return NONE; }
public synchronized int remove(long key) { LongIntLinkedEntry tab[] = table; int index = hash(key) % tab.length; LongIntLinkedEntry e = tab[index]; LongIntLinkedEntry prev = null; while (e != null) { if (CompareUtil.equals(e.key, key)) { if (prev != null) { prev.hash_next = e.hash_next; } else { tab[index] = e.hash_next; } count--; int oldValue = e.value; e.value = NONE; // unchain(e); return oldValue; } prev = e; e = e.hash_next; } return NONE; }
public synchronized int remove(long key) { LongIntLinkedEntry tab[] = table; int index = hash(key) % tab.length; LongIntLinkedEntry e = tab[index]; LongIntLinkedEntry prev = null; while (e != null) { if (CompareUtil.equals(e.key, key)) { if (prev != null) { prev.hash_next = e.hash_next; } else { tab[index] = e.hash_next; } count--; int oldValue = e.value; e.value = NONE; // unchain(e); return oldValue; } prev = e; e = e.hash_next; } return NONE; }
public synchronized int remove(long key) { LongIntLinkedEntry tab[] = table; int index = hash(key) % tab.length; LongIntLinkedEntry e = tab[index]; LongIntLinkedEntry prev = null; while (e != null) { if (CompareUtil.equals(e.key, key)) { if (prev != null) { prev.hash_next = e.hash_next; } else { tab[index] = e.hash_next; } count--; int oldValue = e.value; e.value = NONE; // unchain(e); return oldValue; } prev = e; e = e.hash_next; } return NONE; }