Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 23 of 23 for newCapacity (0.24 sec)

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

       * hashtable size to reduce expensive rehashing. Otherwise the returned power of 2 is 2x the
       * current hashtable size.
       */
      static int newCapacity(int mask) {
        return ((mask < 32) ? 4 : 2) * (mask + 1);
      }
    
      /** Returns the hash prefix given the current mask. */
      static int getHashPrefix(int value, int mask) {
        return value & ~mask;
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Aug 02 21:41:22 GMT 2021
    - 7.1K bytes
    - Viewed (0)
  2. guava/src/com/google/common/collect/ImmutableSet.java

         */
        private void ensureCapacity(int minCapacity) {
          if (minCapacity > dedupedElements.length) {
            int newCapacity =
                ImmutableCollection.Builder.expandedCapacity(dedupedElements.length, minCapacity);
            dedupedElements = Arrays.copyOf(dedupedElements, newCapacity);
          }
        }
    
        /** Adds e to the insertion-order array of deduplicated elements. Calls ensureCapacity. */
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 35.4K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/collect/ImmutableSortedMap.java

        }
    
        private void ensureCapacity(int minCapacity) {
          if (minCapacity > keys.length) {
            int newCapacity = ImmutableCollection.Builder.expandedCapacity(keys.length, minCapacity);
            this.keys = Arrays.copyOf(keys, newCapacity);
            this.values = Arrays.copyOf(values, newCapacity);
          }
        }
    
        /**
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 53.2K bytes
    - Viewed (0)
Back to top