code: public static <T> T min(final Iterator<T> iterator, Comparator<? super T> comparator) {
  		if (comparator == null)
  			throw new NullPointerException("comparator");
  		T min = iterator.next();
  		while (iterator.hasNext()) {
  			T element = iterator.next();
  			min = comparator.compare(min, element) <= 0 ? min : element;
  		}
  		return min;
  	}
docs: Finds the mininmum element according to <code>comparator</code>. If there are several minima, the first one will
  be returned.
  
  @param iterator
  the elements to find the minimum of. May not be <code>null</code>.
  @param comparator
  the comparison function. May not be <code>null</code>.
  @return the minimum
  @throws NoSuchElementException
  if the iterator is empty
  @since 2.7