Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for computeArrayListCapacity (0.22 sec)

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

      }
    
      public void testComputeArrayListCapacity() {
        assertEquals(5, Lists.computeArrayListCapacity(0));
        assertEquals(13, Lists.computeArrayListCapacity(8));
        assertEquals(89, Lists.computeArrayListCapacity(77));
        assertEquals(22000005, Lists.computeArrayListCapacity(20000000));
        assertEquals(Integer.MAX_VALUE, Lists.computeArrayListCapacity(Integer.MAX_VALUE - 1000));
      }
    
      public void testNewArrayListFromCollection() {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Apr 17 16:33:44 UTC 2024
    - 35.2K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/collect/ListsTest.java

      }
    
      public void testComputeArrayListCapacity() {
        assertEquals(5, Lists.computeArrayListCapacity(0));
        assertEquals(13, Lists.computeArrayListCapacity(8));
        assertEquals(89, Lists.computeArrayListCapacity(77));
        assertEquals(22000005, Lists.computeArrayListCapacity(20000000));
        assertEquals(Integer.MAX_VALUE, Lists.computeArrayListCapacity(Integer.MAX_VALUE - 1000));
      }
    
      public void testNewArrayListFromCollection() {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Apr 17 16:33:44 UTC 2024
    - 35.2K bytes
    - Viewed (0)
  3. android/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: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Feb 29 16:48:36 UTC 2024
    - 41.5K bytes
    - Viewed (0)
  4. 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: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Feb 29 16:48:36 UTC 2024
    - 41.9K bytes
    - Viewed (0)
Back to top