@Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append(getClass().getSimpleName()).append("[");

    Node<T> node = head;
    while (node != null) {
      if (node != head) {
        sb.append(", ");
      }
      sb.append("+").append(node.delay).append(": ").append(node.value);

      node = node.next;
    }
    sb.append("]");

    return sb.toString();
  }
Gets the number of items in the queue. This returns in constant time.

@return number of elements in the queue
imagepipeline-base-test/src/main/java/com/facebook/imagepipeline/testing/DeltaQueue.java