Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for newArrayListWithExpectedSize (0.15 sec)

  1. android/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 Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 35.4K bytes
    - Viewed (0)
  2. android/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 Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 42.2K bytes
    - Viewed (0)
Back to top