code: public static <T> AutoCloseableIterator<T> concat(final Collection<AutoCloseableIterator<T>> inputs) {
          return new AutoCloseableIterator<T>(
                  com.google.common.collect.Iterators.concat(inputs.iterator()),
                  new AutoCloseable() {
                      @Override
                      public void close() throws Exception {
                          Exception firstException = null;
                          for (AutoCloseableIterator<? extends T> i : inputs) {
                              try {
                                  i.close();
                              } catch (Exception e) {
                                  if (firstException == null) {
                                      firstException = e;
                                  }
                              }
                          }
                          if (firstException != null) {
                              throw firstException;
                          }
                      }
                  }
          );
      }
docs: Returns an {@link AutoCloseableIterator} that iterates over all the provided input iterators.
  
  If an {@link Exception} is thrown while closing an iterator, the other iterators are closed and the first
  {@link Exception} (only) is rethrown.
  
  @see com.google.common.collect.Iterators#concat(java.util.Iterator[])
  @param inputs the iterators to concatenate
  @param <T> the type of items in the iterator
  @return the concatenated iterators