public static <T extends Comparable<? super T>> T min(final Iterable<T> iterable) {
		if (iterable instanceof SortedSet<?>) {
			SortedSet<T> asSet = (SortedSet<T>) iterable;
			// only use the set-semantic if we can be absolutely sure that the set uses the natural order
			if (asSet.comparator() == null)
				return asSet.first();
		}
		return IteratorExtensions.min(iterable.iterator());
	}
public static < T extends Comparable < ? super T > > T min ( final Iterable < T > iterable ) { if ( iterable instanceof SortedSet < ? > ) { SortedSet < T > asSet = ( SortedSet < T > ) iterable ; if ( asSet . comparator ( ) == null ) return asSet . first ( ) ; } return IteratorExtensions . min ( iterable . iterator ( ) ) ; }
Finds the minimum of the given elements according to their natural ordering. If there are several mimina, the
first one will be returned.

@param iterable
the mutually comparable elements. May not be <code>null</code>.
@return the minimum
@throws NoSuchElementException
if the iterable is empty
@since 2.7