MCPcopy Index your code
hub / github.com/antlr/codebuff / newHashSetWithExpectedSize

Method newHashSetWithExpectedSize

output/java_guava/1.4.17/Sets.java:208–210  ·  view source on GitHub ↗

Creates a HashSet instance, with a high enough initial table size that it should hold expectedSize elements without resizing. This behavior cannot be broadly guaranteed, but it is observed to be true for OpenJDK 1.7. It also can't be guaranteed that the method isn't inadverten

(int expectedSize)

Source from the content-addressed store, hash-verified

206
207
208 public static <E> HashSet<E> newHashSetWithExpectedSize(int expectedSize) {
209 return new HashSet<E>(Maps.capacity(expectedSize));
210 }
211
212 /**
213 * Creates a <i>mutable</i> {@code HashSet} instance containing the given elements. A very thin

Callers 6

getMethod · 0.95
retainAllMethod · 0.95
ofMethod · 0.95
DistinctKeyIteratorClass · 0.95
createCollectionMethod · 0.95
newHashSetMethod · 0.95

Calls 1

capacityMethod · 0.95

Tested by

no test coverage detected