Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for newArrayListWithExpectedSize (0.14 sec)

  1. guava-tests/test/com/google/common/collect/ConcurrentHashMultisetBasherTest.java

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    
    package com.google.common.collect;
    
    import static com.google.common.collect.Lists.newArrayListWithExpectedSize;
    import static com.google.common.collect.Lists.transform;
    import static java.lang.Math.min;
    import static java.util.concurrent.Executors.newFixedThreadPool;
    
    import com.google.common.primitives.Ints;
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Mon Dec 08 22:42:14 UTC 2025
    - 5.7K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/collect/ConcurrentHashMultiset.java

    import static com.google.common.base.Preconditions.checkState;
    import static com.google.common.collect.CollectPreconditions.checkNonnegative;
    import static com.google.common.collect.Lists.newArrayListWithExpectedSize;
    import static com.google.common.collect.Maps.safeGet;
    import static java.lang.Math.max;
    import static java.util.Objects.requireNonNull;
    
    import com.google.common.annotations.GwtIncompatible;
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Mon Dec 08 22:42:14 UTC 2025
    - 22.3K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/collect/ListsTest.java

        ArrayList<Integer> list = newArrayListWithExpectedSize(0);
        assertEquals(emptyList(), list);
    
        ArrayList<Integer> bigger = newArrayListWithExpectedSize(256);
        assertEquals(emptyList(), bigger);
      }
    
      public void testNewArrayListWithExpectedSize_negative() {
        assertThrows(IllegalArgumentException.class, () -> newArrayListWithExpectedSize(-1));
      }
    
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 35.4K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/cache/CacheBuilderFactory.java

       * Sets.cartesianProduct with those, then transforms the result to unwrap the Optionals.
       */
      private Iterable<List<Object>> buildCartesianProduct(Set<?>... sets) {
        List<Set<Optional<?>>> optionalSets = Lists.newArrayListWithExpectedSize(sets.length);
        for (Set<?> set : sets) {
          Set<Optional<?>> optionalSet =
              Sets.newLinkedHashSet(Iterables.transform(set, NULLABLE_TO_OPTIONAL));
          optionalSets.add(optionalSet);
        }
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Jul 08 18:32:10 UTC 2025
    - 8.4K bytes
    - Viewed (0)
  5. guava/src/com/google/common/collect/Lists.java

       */
      @SuppressWarnings("NonApiType") // acts as a direct substitute for a constructor call
      public static <E extends @Nullable Object> ArrayList<E> newArrayListWithExpectedSize(
          int estimatedSize) {
        return new ArrayList<>(computeArrayListCapacity(estimatedSize));
      }
    
      // LinkedList
    
      /**
       * Creates a <i>mutable</i>, empty {@code LinkedList} instance.
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 42.6K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/cache/CacheLoadingTest.java

            Thread.yield();
          }
        }
        gettersStartedSignal.countDown();
        gettersComplete.await();
    
        List<Object> resultList = Lists.newArrayListWithExpectedSize(nThreads);
        for (int i = 0; i < nThreads; i++) {
          resultList.add(result.get(i));
        }
        return resultList;
      }
    
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Sep 30 22:03:28 UTC 2025
    - 91.1K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/cache/CacheLoadingTest.java

            Thread.yield();
          }
        }
        gettersStartedSignal.countDown();
        gettersComplete.await();
    
        List<Object> resultList = Lists.newArrayListWithExpectedSize(nThreads);
        for (int i = 0; i < nThreads; i++) {
          resultList.add(result.get(i));
        }
        return resultList;
      }
    
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Sep 30 22:03:28 UTC 2025
    - 91.1K bytes
    - Viewed (0)
Back to top