Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for newArrayListWithExpectedSize (0.17 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 com.google.common.base.Function;
    import com.google.common.primitives.Ints;
    import java.util.List;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 5.9K 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 21.1K bytes
    - Viewed (0)
  3. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 35K bytes
    - Viewed (0)
  4. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 35K bytes
    - Viewed (0)
  5. guava/src/com/google/common/collect/Lists.java

       */
      @GwtCompatible(serializable = true)
      @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
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 43.1K bytes
    - Viewed (0)
  6. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 86.3K bytes
    - Viewed (0)
Back to top