@Test public void testRehash() { FastByIDMap<String> map = buildTestFastMap(); map.remove(500000L); map.rehash(); assertNull(map.get(500000L)); assertEquals("bang", map.get(47L)); }
public void rehash() { rehash(RandomUtils.nextTwinPrime((int) (loadFactor * numEntries))); }
FastByIDMap implements Serializable, Cloneable { public void rehash() { rehash(RandomUtils.nextTwinPrime((int) (loadFactor * numEntries))); } }
FastByIDMap implements Serializable, Cloneable { public void rehash() { rehash(RandomUtils.nextTwinPrime((int) (loadFactor * numEntries))); } FastByIDMap();  FastByIDMap(int size);  FastByIDMap(int size, float loadFactor);  FastByIDMap(int size, int maxSize);  FastByIDMap(int size, int maxSize, float loadFactor); }
FastByIDMap implements Serializable, Cloneable { public void rehash() { rehash(RandomUtils.nextTwinPrime((int) (loadFactor * numEntries))); } FastByIDMap();  FastByIDMap(int size);  FastByIDMap(int size, float loadFactor);  FastByIDMap(int size, int maxSize);  FastByIDMap(int size, int maxSize, float loadFactor); V get(long key); int size(); boolean isEmpty(); boolean containsKey(long key); boolean containsValue(Object value); V put(long key, V value); V remove(long key); void clear(); LongPrimitiveIterator keySetIterator(); Set<Map.Entry<Long,V>> entrySet(); Collection<V> values(); void rehash(); @Override FastByIDMap<V> clone(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object other); }
FastByIDMap implements Serializable, Cloneable { public void rehash() { rehash(RandomUtils.nextTwinPrime((int) (loadFactor * numEntries))); } FastByIDMap();  FastByIDMap(int size);  FastByIDMap(int size, float loadFactor);  FastByIDMap(int size, int maxSize);  FastByIDMap(int size, int maxSize, float loadFactor); V get(long key); int size(); boolean isEmpty(); boolean containsKey(long key); boolean containsValue(Object value); V put(long key, V value); V remove(long key); void clear(); LongPrimitiveIterator keySetIterator(); Set<Map.Entry<Long,V>> entrySet(); Collection<V> values(); void rehash(); @Override FastByIDMap<V> clone(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object other); static final int NO_MAX_SIZE; }