Here you can find the source of min(final NUMBER_TYPE number1, final NUMBER_TYPE number2)
public static <NUMBER_TYPE extends Number> NUMBER_TYPE min(final NUMBER_TYPE number1, final NUMBER_TYPE number2)
//package com.java2s; public class Main { public static <NUMBER_TYPE extends Number> NUMBER_TYPE min(final NUMBER_TYPE number1, final NUMBER_TYPE number2) { if (number1 == null && number2 == null) { return null; } else if (number1 == null) { return number2; } else if (number2 == null) { return number1; } else if (number1.doubleValue() < number2.doubleValue()) { return number1; } else {/*from ww w . ja v a2 s.c om*/ return number2; } } }