/** * Return the number of unique entries in the map. * * @return number of unique entries in the map. */ public int size() { return map.size(); }
/** * Return the number of unique entries in the map. * * @return number of unique entries in the map. */ public int size() { return map.size(); }
/** * Compact the {@link Map} backing arrays by rehashing with a capacity just larger than current size * and giving consideration to the load factor. */ public void compact() { final int idealCapacity = (int) Math.round(size() * (1.0d / loadFactor)); rehash(QuickMath.nextPowerOfTwo(idealCapacity)); }
/** * Compact the {@link Map} backing arrays by rehashing with a capacity just larger than current size * and giving consideration to the load factor. */ public void compact() { final int idealCapacity = (int) Math.round(size() * (1.0d / loadFactor)); rehash(QuickMath.nextPowerOfTwo(idealCapacity)); }