Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 24 for removeMap (0.52 sec)

  1. guava-tests/test/com/google/common/collect/MinMaxPriorityQueueTest.java

          if (value == 8) {
            iter.remove();
          }
        }
        assertIntact(q);
        assertThat(result).containsExactly(1, 15, 13, 8, 14);
      }
    
      /**
       * This tests a special case of the removeAt() call. Moving an element sideways on the heap could
       * break the invariants. Sometimes we need to bubble an element up instead of trickling down. See
       * implementation.
       */
      public void testInvalidatingRemove() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 35.9K bytes
    - Viewed (0)
  2. guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedArrayBlockingQueue.java

        takeIndex = inc(takeIndex);
        --count;
        return x;
      }
    
      /**
       * Utility for remove and iterator.remove: Delete item at position i. Call only when occupying
       * monitor.
       */
      void removeAt(int i) {
        final E[] items = this.items;
        // if removing front item, just advance
        if (i == takeIndex) {
          items[takeIndex] = null;
          takeIndex = inc(takeIndex);
        } else {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Apr 19 19:24:36 UTC 2023
    - 22.5K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/collect/MinMaxPriorityQueueTest.java

          if (value == 8) {
            iter.remove();
          }
        }
        assertIntact(q);
        assertThat(result).containsExactly(1, 15, 13, 8, 14);
      }
    
      /**
       * This tests a special case of the removeAt() call. Moving an element sideways on the heap could
       * break the invariants. Sometimes we need to bubble an element up instead of trickling down. See
       * implementation.
       */
      public void testInvalidatingRemove() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 35.9K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/TreeMultiset.java

          }
        }
    
        // Removes the maximum node from this subtree to be reused elsewhere
        @CheckForNull
        private AvlNode<E> removeMax(AvlNode<E> node) {
          if (right == null) {
            return left;
          } else {
            right = right.removeMax(node);
            distinctElements--;
            totalCount -= node.elemCount;
            return rebalance();
          }
        }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 20:24:49 UTC 2024
    - 34.1K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/internal/http2/MockHttp2Peer.kt

       * close the socket as soon as this frame has been written; otherwise the peer stays open until
       * explicitly closed.
       */
      fun truncateLastFrame(length: Int): Http2Writer {
        val lastFrame = outFrames.removeAt(outFrames.size - 1)
        require(length < bytesOut.size - lastFrame.start)
    
        // Move everything from bytesOut into a new buffer.
        val fullBuffer = Buffer()
        bytesOut.read(fullBuffer, bytesOut.size)
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Thu Apr 11 22:09:35 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  6. okhttp-idna-mapping-table/src/main/kotlin/okhttp3/internal/idn/MappingTables.kt

          mergeAdjacent@ while (j < ranges.size) {
            val next = ranges[j]
            if (next is MappedRange.InlineDelta &&
              curr.codepointDelta == next.codepointDelta
            ) {
              ranges.removeAt(j)
            } else {
              break@mergeAdjacent
            }
          }
        }
        i++
      }
      return ranges
    }
    
    /**
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskRunner.kt

        }
        for (i in readyQueues.size - 1 downTo 0) {
          val queue = readyQueues[i]
          queue.cancelAllAndDecide()
          if (queue.futureTasks.isEmpty()) {
            readyQueues.removeAt(i)
          }
        }
      }
    
      interface Backend {
        fun nanoTime(): Long
    
        fun coordinatorNotify(taskRunner: TaskRunner)
    
        fun coordinatorWait(
          taskRunner: TaskRunner,
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Apr 29 00:33:04 UTC 2024
    - 10.6K bytes
    - Viewed (0)
  8. guava/src/com/google/common/collect/TreeMultiset.java

          }
        }
    
        // Removes the maximum node from this subtree to be reused elsewhere
        @CheckForNull
        private AvlNode<E> removeMax(AvlNode<E> node) {
          if (right == null) {
            return left;
          } else {
            right = right.removeMax(node);
            distinctElements--;
            totalCount -= node.elemCount;
            return rebalance();
          }
        }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 20:24:49 UTC 2024
    - 34.5K bytes
    - Viewed (0)
  9. okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt

      private fun startNextTask(): SerialTask? {
        taskRunner.assertThreadHoldsLock()
    
        val index = serialTaskQueue.indexOfFirst { it.isReady() }
        if (index == -1) return null
    
        val nextTask = serialTaskQueue.removeAt(index)
        currentTask = nextTask
        contextSwitchCount++
        nextTask.start()
        return nextTask
      }
    
      private interface SerialTask {
        /** Returns true if this task is ready to start. */
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Apr 29 00:33:04 UTC 2024
    - 12.6K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/HttpUrl.kt

          for (i in encodedQueryNamesAndValues!!.size - 2 downTo 0 step 2) {
            if (canonicalName == encodedQueryNamesAndValues!![i]) {
              encodedQueryNamesAndValues!!.removeAt(i + 1)
              encodedQueryNamesAndValues!!.removeAt(i)
              if (encodedQueryNamesAndValues!!.isEmpty()) {
                encodedQueryNamesAndValues = null
                return
              }
            }
          }
        }
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Tue Jan 09 12:33:05 UTC 2024
    - 63.5K bytes
    - Viewed (0)
Back to top