Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 20 for expectedSize (0.04 sec)

  1. android/guava/src/com/google/common/collect/CompactHashSet.java

       *
       * @param expectedSize the initial capacity of this {@code CompactHashSet}.
       */
      CompactHashSet(int expectedSize) {
        init(expectedSize);
      }
    
      /** Pseudoconstructor for serialization support. */
      void init(int expectedSize) {
        Preconditions.checkArgument(expectedSize >= 0, "Expected size must be >= 0");
    
        // Save expectedSize for use in allocArrays()
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue Jul 08 18:32:10 UTC 2025
    - 23.9K bytes
    - Viewed (0)
  2. guava/src/com/google/common/collect/CompactHashMap.java

       *
       * @param expectedSize the initial capacity of this {@code CompactHashMap}.
       */
      CompactHashMap(int expectedSize) {
        init(expectedSize);
      }
    
      /** Pseudoconstructor for serialization support. */
      void init(int expectedSize) {
        Preconditions.checkArgument(expectedSize >= 0, "Expected size must be >= 0");
    
        // Save expectedSize for use in allocArrays()
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue Jul 08 18:32:10 UTC 2025
    - 39.6K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/collect/HashBiMap.java

      private HashBiMap(int expectedSize) {
        init(expectedSize);
      }
    
      @SuppressWarnings("unchecked")
      void init(int expectedSize) {
        CollectPreconditions.checkNonnegative(expectedSize, "expectedSize");
        int tableSize = Hashing.closedTableSize(expectedSize, 1.0);
        size = 0;
    
        keys = (K[]) new Object[expectedSize];
        values = (V[]) new Object[expectedSize];
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 19:31:30 UTC 2025
    - 36.2K bytes
    - Viewed (0)
  4. guava/src/com/google/common/collect/ImmutableSet.java

       *
       * @since 23.1
       */
      public static <E> Builder<E> builderWithExpectedSize(int expectedSize) {
        checkNonnegative(expectedSize, "expectedSize");
        return new Builder<>(expectedSize);
      }
    
      /**
       * A builder for creating {@code ImmutableSet} instances. Example:
       *
       * {@snippet :
       * static final ImmutableSet<Color> GOOGLE_COLORS =
       *     ImmutableSet.<Color>builder()
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 35.2K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/collect/ImmutableSetTest.java

      }
    
      @GwtIncompatible("Builder impl")
      public void testPresizedBuilderForceCopy() {
        for (int expectedSize = 1; expectedSize < 4; expectedSize++) {
          ImmutableSet.Builder<Integer> builder = ImmutableSet.builderWithExpectedSize(expectedSize);
          builder.add(-1);
          Object[] prevArray = null;
          for (int i = 0; i < 10; i++) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 14.1K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/ImmutableBiMap.java

       * @since 23.1
       */
      public static <K, V> Builder<K, V> builderWithExpectedSize(int expectedSize) {
        checkNonnegative(expectedSize, "expectedSize");
        return new Builder<>(expectedSize);
      }
    
      /**
       * A builder for creating immutable bimap instances, especially {@code public static final} bimaps
       * ("constant bimaps"). Example:
       *
       * {@snippet :
       * static final ImmutableBiMap<String, Integer> WORD_TO_INT =
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 22.2K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/ImmutableList.java

       * @since 23.1
       */
      public static <E> Builder<E> builderWithExpectedSize(int expectedSize) {
        checkNonnegative(expectedSize, "expectedSize");
        return new ImmutableList.Builder<>(expectedSize);
      }
    
      /**
       * A builder for creating immutable list instances, especially {@code public static final} lists
       * ("constant lists"). Example:
       *
       * {@snippet :
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Aug 09 01:14:59 UTC 2025
    - 27.5K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/collect/CompactHashMap.java

       *
       * @param expectedSize the initial capacity of this {@code CompactHashMap}.
       */
      CompactHashMap(int expectedSize) {
        init(expectedSize);
      }
    
      /** Pseudoconstructor for serialization support. */
      void init(int expectedSize) {
        Preconditions.checkArgument(expectedSize >= 0, "Expected size must be >= 0");
    
        // Save expectedSize for use in allocArrays()
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Aug 09 01:14:59 UTC 2025
    - 35.7K bytes
    - Viewed (0)
  9. guava/src/com/google/common/io/ByteStreams.java

      static byte[] toByteArray(InputStream in, long expectedSize) throws IOException {
        checkArgument(expectedSize >= 0, "expectedSize (%s) must be non-negative", expectedSize);
        if (expectedSize > MAX_ARRAY_LEN) {
          throw new OutOfMemoryError(expectedSize + " bytes is too large to fit in a byte array");
        }
    
        byte[] bytes = new byte[(int) expectedSize];
        int remaining = (int) expectedSize;
    
        while (remaining > 0) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Jul 17 15:26:41 UTC 2025
    - 31.1K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/collect/MinMaxPriorityQueueTest.java

        MinMaxPriorityQueue<Integer> queue = MinMaxPriorityQueue.expectedSize(8).create();
        assertEquals(8, queue.capacity());
        checkUnbounded(queue);
        checkNatural(queue);
      }
    
      public void testCreation_expectedSize_comparator() {
        MinMaxPriorityQueue<Integer> queue =
            MinMaxPriorityQueue.orderedBy(SOME_COMPARATOR).expectedSize(8).create();
        assertEquals(8, queue.capacity());
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 36K bytes
    - Viewed (0)
Back to top