code: @CanIgnoreReturnValue // TODO(kak): Consider removing this
    public <E extends T> E max(Iterator<E> iterator) {
      // let this throw NoSuchElementException as necessary
      E maxSoFar = iterator.next();
  
      while (iterator.hasNext()) {
        maxSoFar = max(maxSoFar, iterator.next());
      }
  
      return maxSoFar;
    }
docs: Returns the greatest of the specified values according to this ordering. If there are multiple
  greatest values, the first of those is returned. The iterator will be left exhausted: its
  {@code hasNext()} method will return {@code false}.
  
  <p><b>Java 8 users:</b> Continue to use this method for now. After the next release of Guava,
  use {@code Streams.stream(iterator).max(thisComparator).get()} instead (but note that it does
  not guarantee which tied maximum element is returned).
  
  @param iterator the iterator whose maximum element is to be determined
  @throws NoSuchElementException if {@code iterator} is empty
  @throws ClassCastException if the parameters are not <i>mutually comparable</i> under this
  ordering.
  @since 11.0