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

Method initialCapacity

output/java_guava/1.4.19/MapMaker.java:150–159  ·  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

148 */
149
150 @CanIgnoreReturnValue
151 public MapMaker initialCapacity(int initialCapacity) {
152 checkState(
153 this.initialCapacity == UNSET_INT,
154 "initial capacity was already set to %s",
155 this.initialCapacity);
156 checkArgument(initialCapacity >= 0);
157 this.initialCapacity = initialCapacity;
158 return this;
159 }
160
161 int getInitialCapacity() {
162 return (initialCapacity == UNSET_INT) ? DEFAULT_INITIAL_CAPACITY : initialCapacity;

Callers 2

toCacheBuilderMethod · 0.45
readMapMakerMethod · 0.45

Calls 2

checkStateMethod · 0.45
checkArgumentMethod · 0.45

Tested by

no test coverage detected