Check if there is any item in the queue

@return null if there is no item inside the queue
427097
public E poll() {
    E result = buffer.poll();
    if (producer != null) {
      producer.wakeUp();
    }

    return result;
  }
303372
public function isEmpty()
    {
        return $this->isNull()
            || (is_array($this->value) && count($this->value) === 0)
            || $this->length() === 0;
    }
1084661
public function hasError()
	{
		if( isset( $this->info['error'] ) )
			return ( empty( $this->info['error'] ) ? NULL : $this->info['error'] );
		else
			return NULL;
	}
533660
protected function getNext()
    {
        if (!$this->current)
        {
            return null;
        }
        if ($this->next !== -1)
        {
            return $this->next;
        }
        $this->load();
        for ($i = 0; $i < count($this->items); $i++)
        {
            if ($this->items[$i]->id == $this->current->id)
            {
                if ($i + 1 < count($this->items))
                {
                    $this->next = $this->items[$i + 1];
                    return $this->next;
                }
                break;
            }
        }
        return null;
    }
604723
public function first() {

		$this->sort();

		return !empty($this->items) ? reset($this->items) : NULL;

	}
338598
protected function queueExists()
    {
        if (isset($this->queueUrl)) {
            return true;
        }

        if ($this->getCache()->has($this->getUrlCacheKey())) {
            $this->queueUrl = $this->getCache()->get($this->getUrlCacheKey());
            return true;
        }

        try {
            $result = $this->getClient()->getQueueUrl([
                'QueueName' => $this->getQueueNameWithPrefix()
            ]);

            $this->queueUrl = $result->get('QueueUrl');

            if ($result->hasKey('QueueUrl')) {
                $this->queueUrl = $result->get('QueueUrl');
            } else {
                $this->logError('Queue url for'. $this->getQueueNameWithPrefix() .' not fetched');
            }

            if ($this->queueUrl !== null) {
                $this->getCache()->put($this->queueUrl, $this->getUrlCacheKey());
                $this->logDebug('Queue url '. $this->queueUrl .' fetched and cached');
                return true;
            }
        } catch (AwsException $e) {
            $this->logWarning('Fetching queue url for '. $this->getQueueNameWithPrefix() .' failed. MSG: '. $e->getAwsErrorMessage());
        }

        return false;
    }
382085
public boolean isEmpty() throws SIConnectionDroppedException
   {
      synchronized(queueMonitor)
      {
         if (state == CLOSED) throw new SIConnectionDroppedException(TraceNLS.getFormattedMessage(JFapChannelConstants.MSG_BUNDLE, "PRIORITY_QUEUE_PURGED_SICJ0077", null, "PRIORITY_QUEUE_PURGED_SICJ0077"));
         return totalQueueDepth == 0;
      }
   }
830953
public function isEmpty()
    {
        if (parent::isEmpty()) {
            return true;
        }

        if (null === $this->read()) {
            $this->clear();

            return true;
        }

        return false;
    }
490745
public function isNewItemAdded()
    {
        if ($this->_blNewITemAdded == null) {
            $this->_blNewITemAdded = (bool) \OxidEsales\Eshop\Core\Registry::getSession()->getVariable("blAddedNewItem");
            \OxidEsales\Eshop\Core\Registry::getSession()->deleteVariable("blAddedNewItem");
        }

        return $this->_blNewITemAdded;
    }
1039236
public function hasSeoMetadata()
    {
        if ($this->seoMetadata instanceof ArrayIterator) {
            return (count($this->seoMetadata) > 0);
        }

        return !empty($this->seoMetadata);
    }
1027811
protected function NextItem()
	{
		while ( $this->iter->MoveNext() )
		{
		    if ( $this->iter->getSequentialPosition() == $this->position )
		    {
		    	$this->iter->ResetSequentialPosition();
		        return $this->iter->getCurrent();
		    }
		}
		return null;
	}
586753
public function hasNext(): bool
    {
        return !empty($this->entries) && ($this->getStartIndex() + $this->getItemsPerPage() - 1 < $this->getTotalResults());
    }
649108
public boolean isEmpty(short sessionId)
   {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "isEmpty", ""+sessionId);
      boolean queueEmpty = false;
      synchronized (this)
      {
    	  synchronized(queue)
    	  {
    		  queueEmpty = queue.isEmpty();
    		  if (!queueEmpty)
    		  {
    			  //System.out.println("  isEmpty(): Got has data on");
    			  // The queue is not empty. Make sure there is a complete message available
    			  QueueData data = queue.getLast();
    			  //System.out.println("  isEmpty(): First item: " + data);
    			  // If the data is not complete, the queue is still regarded as empty
    			  queueEmpty = !data.isComplete();
    			  //System.out.println("  ** isEmpty(): " + queueEmpty);
    		  }
          }
      }
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "isEmpty", ""+queueEmpty);
      return queueEmpty;
   }
813746
public function isEmpty(): bool
    {
        return $this->isNull()
            || (is_array($this->value) && count($this->value) === 0)
            || (is_string($this->value) && strlen($this->value) === 0);
    }
258981
boolean isEmpty()
  {
    if (tc.isEntryEnabled())
      tc.entry(this,cclass, "isEmpty");

    boolean manyChildResult = singleMatchManyChild == null && 
                                (matchManyChildren == null || matchManyChildren.isEmpty());
    boolean result = manyChildResult && matchOneChild == null && 
      exactChild == null && suffix == null;

    if (tc.isEntryEnabled())
      tc.exit(this,cclass, "isEmpty", "result: " + new Boolean(result));

    return result;
  }
190577
private function PreviousItem()
    {
        $this->previous = $this->GetTreeItem('previous');
        return $this->previous->Exists() ? $this->previous : null;
    }
543772
public function count()
    {
        $counts = array_map(function(QueueInterface $queue) {
            return $queue->count();
        }, $this->getQueues());

        return array_sum($counts);
    }