protected function nextAndRemove()
    {
        if (false === next($this->values[$this->maxPriority])) {
            unset($this->priorities[$this->maxPriority]);
            unset($this->values[$this->maxPriority]);
            $this->maxPriority = empty($this->priorities) ? 0 : max($this->priorities);
            $this->subIndex    = -1;
        }
        ++$this->index;
        ++$this->subIndex;
        --$this->count;
    }