Here you can find the source of min(T v1, T v2)
public static <T extends Comparable<T>> T min(T v1, T v2)
//package com.java2s; //License from project: Apache License public class Main { public static <T extends Comparable<T>> T min(T v1, T v2) { return v1.compareTo(v2) > 0 ? v2 : v1; }/*from w ww . ja va 2 s.com*/ }