public static <T extends Object & java.lang.Comparable<? super T>>T min(Collection<? extends T> collection){
  Iterator<? extends T> it=collection.iterator();
  T min=it.next();
  while (it.hasNext()) {
    T next=it.next();
    if (min.compareTo(next) > 0) {
      min=next;
    }
  }
  return min;
}

public static < T extends Object & java . lang . Comparable < ? super T > > T min ( Collection < ? extends T > collection ) { Iterator < ? extends T > it = collection . iterator ( ) ; T min = it . next ( ) ; while ( it . hasNext ( ) ) { T next = it . next ( ) ; if ( min . compareTo ( next ) > 0 ) { min = next ; } } return min ; }
searches the specified collection for the minimum element .
