code: public static <T> CloseableIterator<T> filter(final CloseableIterator<?> iterator, final Class<T> type) {
          return wrap(Iterators.filter(iterator, type), iterator);
      }
docs: Returns all instances of class {@code type} in {@code unfiltered}. The
  returned closeable iterator has elements whose class is {@code type} or a subclass of
  {@code type}.