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

Method initialCapacity

output/java_guava/1.4.16/MapMaker.java:150–158  ·  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(this.initialCapacity == UNSET_INT,
153 "initial capacity was already set to %s",
154 this.initialCapacity);
155 checkArgument(initialCapacity >= 0);
156 this.initialCapacity = initialCapacity;
157 return this;
158 }
159
160 int getInitialCapacity() {
161 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