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

Method newLinkedHashSetWithExpectedSize

output/java_guava/1.4.18/Sets.java:330–332  ·  view source on GitHub ↗

Creates a LinkedHashSet instance, with a high enough "initial capacity" that it should hold expectedSize elements without growth. 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 inadve

(int expectedSize)

Source from the content-addressed store, hash-verified

328
329
330 public static <E> LinkedHashSet<E> newLinkedHashSetWithExpectedSize(int expectedSize) {
331 return new LinkedHashSet<E>(Maps.capacity(expectedSize));
332 }
333
334 /**
335 * Creates a <i>mutable</i> {@code LinkedHashSet} instance containing the given elements in order.

Callers 1

getMethod · 0.95

Calls 1

capacityMethod · 0.95

Tested by

no test coverage detected