Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for newCapacity (0.28 sec)

  1. guava/src/com/google/common/collect/CompactLinkedHashMap.java

          setSucceeds(dstIndex, getSuccessor(srcIndex));
        }
        setLink(srcIndex, 0);
      }
    
      @Override
      void resizeEntries(int newCapacity) {
        super.resizeEntries(newCapacity);
        links = Arrays.copyOf(requireLinks(), newCapacity);
      }
    
      @Override
      int firstEntryIndex() {
        return firstEntry;
      }
    
      @Override
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  2. guava/src/com/google/common/collect/ImmutableCollection.java

          }
          // careful of overflow!
          int newCapacity = oldCapacity + (oldCapacity >> 1) + 1;
          if (newCapacity < minCapacity) {
            newCapacity = Integer.highestOneBit(minCapacity - 1) << 1;
          }
          if (newCapacity < 0) {
            newCapacity = Integer.MAX_VALUE;
            // guaranteed to be >= newCapacity
          }
          return newCapacity;
        }
    
        Builder() {}
    
        /**
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 18.7K bytes
    - Viewed (1)
  3. src/main/java/org/codelibs/core/collection/ArrayMap.java

                final Entry<K, V>[] oldTable = listTable;
                final int newCapacity = oldTable.length * 2 + 1;
                @SuppressWarnings("unchecked")
                final Entry<K, V>[] newMapTable = new Entry[newCapacity];
                @SuppressWarnings("unchecked")
                final Entry<K, V>[] newListTable = new Entry[newCapacity];
                threshold = (int) (newCapacity * LOAD_FACTOR);
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 20.6K bytes
    - Viewed (1)
  4. android/guava/src/com/google/common/collect/ImmutableCollection.java

          }
          // careful of overflow!
          int newCapacity = oldCapacity + (oldCapacity >> 1) + 1;
          if (newCapacity < minCapacity) {
            newCapacity = Integer.highestOneBit(minCapacity - 1) << 1;
          }
          if (newCapacity < 0) {
            newCapacity = Integer.MAX_VALUE;
            // guaranteed to be >= newCapacity
          }
          return newCapacity;
        }
    
        Builder() {}
    
        /**
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 21.5K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/collect/CompactLinkedHashMap.java

          setSucceeds(dstIndex, getSuccessor(srcIndex));
        }
        setLink(srcIndex, 0);
      }
    
      @Override
      void resizeEntries(int newCapacity) {
        super.resizeEntries(newCapacity);
        links = Arrays.copyOf(requireLinks(), newCapacity);
      }
    
      @Override
      int firstEntryIndex() {
        return firstEntry;
      }
    
      @Override
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 8.5K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/MinMaxPriorityQueue.java

        if (size > queue.length) {
          int newCapacity = calculateNewCapacity();
          Object[] newQueue = new Object[newCapacity];
          System.arraycopy(queue, 0, newQueue, 0, queue.length);
          queue = newQueue;
        }
      }
    
      /** Returns ~2x the old capacity if small; ~1.5x otherwise. */
      private int calculateNewCapacity() {
        int oldCapacity = queue.length;
        int newCapacity =
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 21:19:52 GMT 2024
    - 34K bytes
    - Viewed (0)
  7. 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)
  8. 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