Here you can find the source of min(Collection
public static <T extends Comparable<T>> T min(Collection<T> elems)
//package com.java2s; //License from project: Apache License import java.util.*; public class Main { public static <T extends Comparable<T>> T min(Collection<T> elems) { T min = null;//w w w. j av a 2 s.c o m for (T t : elems) { if (min == null || min.compareTo(t) > 0) { min = t; } } return min; } }