Java Array Min Value minNum(Number iArr[])

Here you can find the source of minNum(Number iArr[])

Description

min Num

License

Open Source License

Declaration

public static Number minNum(Number iArr[]) 

Method Source Code

//package com.java2s;

public class Main {

    public static Number minNum(Number iArr[]) {
        if (iArr == null || iArr.length <= 0) {
            return null;
        }//  w w  w.j a va 2  s . co  m
        Number rtn = iArr[0];
        for (int i = 1; i < iArr.length; i++) {
            if (rtn.doubleValue() < iArr[i].doubleValue()) {
                continue;
            }
            if (rtn.doubleValue() > iArr[i].doubleValue()) {
                rtn = iArr[i];
                continue;
            }
        }
        return rtn;
    }
}

Related

  1. minMax(int[] values)
  2. minmax(String args[], boolean minimum)
  3. minMaxAvg(int[] arr)
  4. minMaxOverArraySubset(double[] array, Iterable subset, boolean min)
  5. minNonNeg(int... vals)
  6. minOf(double[] da, double val)
  7. minOfArr(int[] arrInput)
  8. minOfArray(float[] array)
  9. minOfCol(int[][] matrixTable, int colBound)