Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for newArrayListWithExpectedSize (1.43 sec)

  1. 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)
  2. 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)
  3. 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)
Back to top