MCPcopy Create free account
hub / github.com/antlr/codebuff / initialCapacity

Method initialCapacity

output/java_guava/1.4.13/CacheBuilder.java:342–349  ·  view source on GitHub ↗

Sets the minimum total size for the internal hash tables. For example, if the initial capacity is 60, and the concurrency level is 8, then eight segments are created, each having a hash table of size eight. Providing a large enough estimate at construction time avoids the need for ex

(int initialCapacity)

Source from the content-addressed store, hash-verified

340
341
342 public CacheBuilder<K, V> initialCapacity(int initialCapacity) {
343 checkState(this.initialCapacity == UNSET_INT,
344 "initial capacity was already set to %s",
345 this.initialCapacity);
346 checkArgument(initialCapacity >= 0);
347 this.initialCapacity = initialCapacity;
348 return this;
349 }
350
351 int getInitialCapacity() {
352 return (initialCapacity == UNSET_INT) ? DEFAULT_INITIAL_CAPACITY : initialCapacity;

Callers 1

toCacheBuilderMethod · 0.45

Calls 2

checkStateMethod · 0.45
checkArgumentMethod · 0.45

Tested by

no test coverage detected