@Override public final boolean ensureCapacity(long minSize) { int intMinSize = (int) Math.min(minSize, (long) Integer.MAX_VALUE); if (minSize < 0L) throw new IllegalArgumentException( "Min size should be positive, " + minSize + " given."); return intMinSize > maxSize && tryRehashForExpansion(targetCapacity(intMinSize)); }
@Override public final boolean ensureCapacity(long minSize) { int intMinSize = (int) Math.min(minSize, (long) Integer.MAX_VALUE); if (minSize < 0L) throw new IllegalArgumentException( "Min size should be positive, " + minSize + " given."); return intMinSize > maxSize && tryRehashForExpansion(targetCapacity(intMinSize)); }
final void init(HashConfigWrapper configWrapper, int size) { this.configWrapper = configWrapper; this.size = 0; internalInit(targetCapacity(size)); }
final void init(HashConfigWrapper configWrapper, int size) { this.configWrapper = configWrapper; this.size = 0; internalInit(targetCapacity(size)); }
@Override public boolean shrink() { int newCapacity = targetCapacity(size); if (newCapacity < capacity()) { rehash(newCapacity); return true; } else { return false; } }
@Override public boolean shrink() { int newCapacity = targetCapacity(size); if (newCapacity < capacity()) { rehash(newCapacity); return true; } else { return false; } }