code: public void dequeueIfNotDoneYet(Element elem, String name, Object object) {
      @SuppressWarnings("rawtypes")
      Queue queue = queue(elem, name, null);
      if (queue != null && object.equals(queue.peek())) {
        dequeueCurrentAndRunNext(elem, name);
      }
    }
docs: Dequeue the object and run the next if it is the first
  in the queue.