Here you can find the source of min(T v1, T v2, int nullSupport)
public static <T extends Comparable<T>> T min(T v1, T v2, int nullSupport)
//package com.java2s; //License from project: Apache License public class Main { public static final int NULL_IS_MINIMUM = 1; public static <T extends Comparable<T>> T min(T v1, T v2, int nullSupport) { if (v1 == v2) return v1; if (v1 == null) { return nullSupport == NULL_IS_MINIMUM ? v1 : v2; }//from w ww . j a va 2s. co m if (v2 == null) { return nullSupport == NULL_IS_MINIMUM ? v2 : v1; } int v = v1.compareTo(v2); return (v > 0) ? v2 : v1; } }