@@ -0,0 +1,834 @@
+package org.biocreative.bioc.util;%0A%0Aimport java.util.Collections;%0Aimport java.util.Iterator;%0A%0Aimport org.biocreative.bioc.BioCCollection;%0Aimport org.biocreative.bioc.BioCDocument;%0A%0Aimport com.google.common.collect.Iterators;%0A%0Apublic class BioCDocumentIterator implements Iterator%3CBioCDocument%3E %7B%0A%0A  private Iterator%3CBioCDocument%3E documentItr;%0A  %0A  public BioCDocumentIterator() %7B%0A    documentItr = Collections.emptyIterator();%0A  %7D%0A  %0A  public BioCDocumentIterator(BioCCollection collection) %7B%0A    documentItr = collection.getDocuments().iterator();%0A  %7D%0A  %0A  public BioCDocumentIterator(BioCDocument document) %7B%0A    documentItr = Iterators.singletonIterator(document);%0A  %7D%0A%0A  @Override%0A  public boolean hasNext() %7B%0A    return documentItr.hasNext();%0A  %7D%0A%0A  @Override%0A  public BioCDocument next() %7B%0A    return documentItr.next();%0A  %7D%0A%0A%7D%0A

clean io