public <E extends T>E max(Iterable<E> iterable){
  Iterator<E> iterator=iterable.iterator();
  E maxSoFar=iterator.next();
  while (iterator.hasNext()) {
    maxSoFar=max(maxSoFar,iterator.next());
  }
  return maxSoFar;
}

public < E extends T > E max ( Iterable < E > iterable ) { Iterator < E > iterator = iterable . iterator ( ) ; E maxSoFar = iterator . next ( ) ; while ( iterator . hasNext ( ) ) { maxSoFar = max ( maxSoFar , iterator . next ( ) ) ; } return maxSoFar ; }
returns the largest of the specified values according to this ordering . if there are multiple largest values , the first of those is returned .
