Java Number Min Value Min(Object in)

Here you can find the source of Min(Object in)

Description

Min

License

Open Source License

Declaration

public static final int Min(Object in) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static final int Min(Object in) {
        int out = Integer.MAX_VALUE;
        if (in == null)
            return 0;
        if (in instanceof int[]) {
            int[] inn = (int[]) in;
            for (int i = 0, s = inn.length; i < s; i++)
                out = Min(out, inn[i]);//ww  w  . ja va  2  s .  c o  m
            return out;
        } else {
            for (int i = 0, s = ((Object[]) in).length; i < s; i++)
                out = Min(out, Min(((Object[]) in)[i]));
            return out;
        }
    }

    public static final int Min(int x1, int x2) {
        return (x1 < x2 ? x1 : x2);
    }
}

Related

  1. min(long m, long n)
  2. min(long x, long y)
  3. min(Number a, Number b)
  4. min(Number n0, Number n1)
  5. min(Number num1, Number num2)
  6. min(Object o1, Object o2)
  7. min(String a, String b)
  8. min(String a, String b)
  9. min(String in, int len)