@@ -0,0 +1,363 @@
+package com.github.nikita_volkov.java.iterators;%0A%0Aimport java.util.*;%0A%0Apublic class QueueDrainingIterator%3Ca%3E implements Iterator%3Ca%3E %7B%0A%0A  private final Queue%3Ca%3E queue;%0A%0A  public QueueDrainingIterator(Queue%3Ca%3E queue) %7B%0A    this.queue = queue;%0A  %7D%0A%0A  public boolean hasNext() %7B%0A    return !queue.isEmpty();%0A  %7D%0A%0A  public a next() %7B%0A    return queue.remove();%0A  %7D%0A%0A%7D%0A

Add QueueDrainingIterator