Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 16 for removeMax (0.04 sec)

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

            return rebalance();
          }
        }
    
        // Removes the maximum node from this subtree to be reused elsewhere
        private @Nullable AvlNode<E> removeMax(AvlNode<E> node) {
          if (right == null) {
            return left;
          } else {
            right = right.removeMax(node);
            distinctElements--;
            totalCount -= node.elemCount;
            return rebalance();
          }
        }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 33.8K bytes
    - Viewed (0)
  2. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/concurrent/TaskQueue.kt

        if (existingIndex != -1) {
          if (task.nextExecuteNanoTime <= executeNanoTime) {
            taskRunner.logger.taskLog(task, this) { "already scheduled" }
            return false
          }
          futureTasks.removeAt(existingIndex) // Already scheduled later: reschedule below!
        }
        task.nextExecuteNanoTime = executeNanoTime
        taskRunner.logger.taskLog(task, this) {
          if (recurrence) {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed May 28 23:28:25 UTC 2025
    - 7.3K bytes
    - Viewed (0)
  3. okhttp/src/jvmTest/kotlin/okhttp3/internal/concurrent/TaskRunnerTest.kt

            override fun runOnce(): Long {
              log += "run@${taskFaker.nanoTime}"
              if (schedules.isNotEmpty()) {
                redQueue.schedule(this, schedules.removeAt(0))
              }
              return delays.removeAt(0)
            }
          }
        redQueue.schedule(task, 100.µs)
    
        taskFaker.advanceUntil(0.µs)
        assertThat(log).isEmpty()
    
        taskFaker.advanceUntil(100.µs)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 23K bytes
    - Viewed (0)
  4. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerWriter.kt

        path += name
        try {
          block(content)
          constructedBit = if (constructed) 0b0010_0000 else 0
          constructed = true // The enclosing object is constructed.
        } finally {
          stack.removeAt(stack.size - 1)
          path.removeAt(path.size - 1)
        }
    
        val sink = sink()
    
        // Write the tagClass, tag, and constructed bit. This takes 1 byte if tag is less than 31.
        if (tag < 31) {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 5.7K bytes
    - Viewed (0)
  5. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/-HeadersCommon.kt

      apply {
        var i = 0
        while (i < namesAndValues.size) {
          if (name.equals(namesAndValues[i], ignoreCase = true)) {
            namesAndValues.removeAt(i) // name
            namesAndValues.removeAt(i) // value
            i -= 2
          }
          i += 2
        }
      }
    
    /**
     * Set a field with the specified value. If the field is not found, it is added. If the field is
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon May 05 16:01:00 UTC 2025
    - 5.8K bytes
    - Viewed (0)
  6. 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) {
        E[] items = this.items;
        // if removing front item, just advance
        if (i == takeIndex) {
          items[takeIndex] = null;
          takeIndex = inc(takeIndex);
        } else {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 22.4K bytes
    - Viewed (0)
  7. 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 Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 36K bytes
    - Viewed (0)
  8. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerReader.kt

          }
    
          return result
        } finally {
          peekedHeader = null
          limit = pushedLimit
          constructed = pushedConstructed
          if (name != null) path.removeAt(path.size - 1)
        }
      }
    
      /**
       * Execute [block] with a new namespace for type hints. Type hints from the enclosing type are no
       * longer usable by the current type's members.
       */
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 10.5K bytes
    - Viewed (0)
  9. okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt

      private fun startNextTask(): SerialTask? {
        taskRunner.assertLockHeld()
    
        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 Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed May 28 23:28:25 UTC 2025
    - 11.9K bytes
    - Viewed (0)
  10. okhttp/src/commonJvmAndroid/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 Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 11:30:11 UTC 2025
    - 10.4K bytes
    - Viewed (0)
Back to top