Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for calculateNewCapacity (0.15 sec)

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

      private void growIfNeeded() {
        if (size > queue.length) {
          int newCapacity = calculateNewCapacity();
          Object[] newQueue = new Object[newCapacity];
          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 =
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Mon Sep 22 18:35:44 UTC 2025
    - 33.9K bytes
    - Viewed (0)
Back to top