code: public static <T> Source<T> from(final Iterator<T> iterator) {
          return new AbstractSource<T>() {
              @Override
              protected T computeNext() throws IOException {
                  if (iterator.hasNext()) {
                      return iterator.next();
                  }
                  return endOfData();
              }
          };
      }
docs: Gets a source from the items in the given iterator.
  
  @param iterator the iterator.
  @param <T> the type.
  @return the source.