- Sort Score
- Num 10 results
- Language All
Results 1 - 5 of 5 for newHashMapWithExpectedSize (0.17 seconds)
-
android/guava/src/com/google/common/graph/ElementOrder.java
/** Returns an empty mutable map whose keys will respect this {@link ElementOrder}. */ <K extends T, V> Map<K, V> createMap(int expectedSize) { switch (type) { case UNORDERED: return Maps.newHashMapWithExpectedSize(expectedSize); case INSERTION: case STABLE: return Maps.newLinkedHashMapWithExpectedSize(expectedSize); case SORTED: return Maps.newTreeMap(comparator()); }Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Wed Mar 11 01:10:31 GMT 2026 - 6.5K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/collect/MapsTest.java
// after jdk7u40: creates empty table assertThat(bucketsOf(Maps.newHashMapWithExpectedSize(0))).isAtMost(1); for (int size = 1; size < 200; size++) { assertWontGrow( size, new HashMap<>(), Maps.newHashMapWithExpectedSize(size), Maps.newHashMapWithExpectedSize(size)); } } /** Same test as above but for newLinkedHashMapWithExpectedSize */Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Fri Mar 13 13:01:07 GMT 2026 - 63.2K bytes - Click Count (0) -
android/guava/src/com/google/common/graph/Graphs.java
return true; // Optimization for the undirected case: at least one cycle must exist. } Map<Object, NodeVisitState> visitedNodes = Maps.newHashMapWithExpectedSize(graph.nodes().size()); for (N node : graph.nodes()) { if (subgraphHasCycle(graph, visitedNodes, node)) { return true; } } return false; } /**Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Wed Mar 11 01:10:31 GMT 2026 - 24.4K bytes - Click Count (0) -
android/guava/src/com/google/common/collect/Maps.java
*/ @SuppressWarnings("NonApiType") // acts as a direct substitute for a constructor call public static <K extends @Nullable Object, V extends @Nullable Object> HashMap<K, V> newHashMapWithExpectedSize(int expectedSize) { return new HashMap<>(capacity(expectedSize)); } /** * Returns a capacity that is sufficient to keep the map from being resized as long as it grows noCreated: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Wed Apr 01 17:27:13 GMT 2026 - 157.6K bytes - Click Count (0) -
guava/src/com/google/common/collect/Maps.java
*/ @SuppressWarnings("NonApiType") // acts as a direct substitute for a constructor call public static <K extends @Nullable Object, V extends @Nullable Object> HashMap<K, V> newHashMapWithExpectedSize(int expectedSize) { return new HashMap<>(capacity(expectedSize)); } /** * Returns a capacity that is sufficient to keep the map from being resized as long as it grows noCreated: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Wed Apr 01 17:27:13 GMT 2026 - 163.4K bytes - Click Count (0)