Java Number Min Value min(Comparable c1, Comparable c2)

Here you can find the source of min(Comparable c1, Comparable c2)

Description

min

License

Mozilla Public License

Declaration

public static Object min(Comparable c1, Comparable c2) 

Method Source Code

//package com.java2s;
//License from project: Mozilla Public License 

public class Main {
    public static Object min(Comparable c1, Comparable c2) {
        if (c1 != null && c2 != null) {
            return c1.compareTo(c2) < 1 ? c1 : c2;
        } else {/*from  ww  w. ja  va2 s . com*/
            return c1 != null ? c1 : c2;
        }
    }
}

Related

  1. findMin(double newNumber, double currentMin)
  2. findMin(int a, int b, int c, int d)
  3. findMinAngularDistance(double angle1, double angle2)
  4. min( final double p_first, final double p_second, final double p_third )
  5. min(Comparable c1, Comparable c2)
  6. min(Double a, Double b)
  7. min(double a, double b)
  8. min(double a, double b)
  9. min(double a, double b)