Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for computeArrayListCapacity (0.42 sec)

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

      }
    
      public void testComputeArrayListCapacity() {
        assertEquals(5, computeArrayListCapacity(0));
        assertEquals(13, computeArrayListCapacity(8));
        assertEquals(89, computeArrayListCapacity(77));
        assertEquals(22000005, computeArrayListCapacity(20000000));
        assertEquals(Integer.MAX_VALUE, computeArrayListCapacity(Integer.MAX_VALUE - 1000));
      }
    
      public void testNewArrayListFromCollection() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 35K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/collect/ListsTest.java

      }
    
      public void testComputeArrayListCapacity() {
        assertEquals(5, computeArrayListCapacity(0));
        assertEquals(13, computeArrayListCapacity(8));
        assertEquals(89, computeArrayListCapacity(77));
        assertEquals(22000005, computeArrayListCapacity(20000000));
        assertEquals(Integer.MAX_VALUE, computeArrayListCapacity(Integer.MAX_VALUE - 1000));
      }
    
      public void testNewArrayListFromCollection() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 35K bytes
    - Viewed (0)
  3. guava/src/com/google/common/collect/Lists.java

      public static <E extends @Nullable Object> ArrayList<E> newArrayList(E... elements) {
        checkNotNull(elements); // for GWT
        // Avoid integer overflow when a large array is passed in
        int capacity = computeArrayListCapacity(elements.length);
        ArrayList<E> list = new ArrayList<>(capacity);
        Collections.addAll(list, elements);
        return list;
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 43.1K bytes
    - Viewed (0)
Back to top