取最小值

@param <T> 元素类型
@param numberArray 数字数组
@return 最小值
@since 3.0.9
482258
public static <T extends Comparable<? super T>> T min(T[] numberArray) {
		if (isEmpty(numberArray)) {
			throw new IllegalArgumentException("Number array must not empty !");
		}
		T min = numberArray[0];
		for (int i = 0; i < numberArray.length; i++) {
			if (ObjectUtil.compare(min, numberArray[i]) > 0) {
				min = numberArray[i];
			}
		}
		return min;
	}
299443
public ScriptBuilder smallNum(int index, int num) {
        checkArgument(num >= 0, "Cannot encode negative numbers with smallNum");
        checkArgument(num <= 16, "Cannot encode numbers larger than 16 with smallNum");
        return addChunk(index, new ScriptChunk(Script.encodeToOpN(num), null));
    }
788088
public static long min(LongArrayND array)
    {
        return array.stream().parallel().reduce(
            Long.MAX_VALUE, Math::min);
    }
379828
public static <T extends Comparable<T>> Integer[] arsort(T[] array) {
        return _asort(array, true);
    }
1137926
public static int[][] toInt(double[][] array) {
        int[][] n = new int[array.length][array[0].length];
        for (int i = 0; i < array.length; i++) {
            for (int j = 0; j < array[0].length; j++) {
                n[i][j] = (int) array[i][j];
            }
        }
        return n;
    }
872903
public long[] toPrimitiveArray(long[] array) {
	for (int i = 0, j = 0; i < array.length; ++i) {
	    int index = -1;
	    if (j < indices.length && (index = indices[j]) == i) {
		array[i] = values[j];
		j++;
	    }
	    else
		array[i] = 0;
	}

	return array;
    }
557465
public static int searchMin(int[] intArray) {
        if(intArray.length == 0) {
            throw new IllegalArgumentException("The array you provided does not have any elements");
        }

        int min = intArray[0];

        for(int i = 1; i < intArray.length; i++) {
            if(intArray[i] < min) {
                min = intArray[i];
            }
        }

        return min;
    }
1204016
public static String printArray(int[] array)
    {
        String result = "[";

        for (int i = 0; i < array.length; i++)
        {
            result += array[i];
            result += (i < (array.length - 1)) ? ", " : "";
        }

        result += "]";

        return result;
    }
1329187
protected void fillArray(final short[] array) {
    int pos = 0;
    int base = 0;
    for (int k = 0; k < bitmap.length; ++k) {
      long bitset = bitmap[k];
      while (bitset != 0) {
        array[pos++] = (short) (base + numberOfTrailingZeros(bitset));
        bitset &= (bitset - 1);
      }
      base += 64;
    }
  }
686092
public static <T extends Number> int[] asArray(final T... array) {
        int[] b = new int[array.length];
        for (int i = 0; i < b.length; i++) {
            b[i] = array[i].intValue();
        }
        return b;
    }
1002392
@Override
   public <T> T[] toArray(T[] a) {
      // Estimate size of array; be prepared to see more or fewer elements
      int size = size();
      T[] r = a.length >= size ? a :
            (T[])java.lang.reflect.Array
                  .newInstance(a.getClass().getComponentType(), size);
      try (CloseableIterator<O> it = iterator()) {
         for (int i = 0; i < r.length; i++) {
            if (! it.hasNext()) { // fewer elements than expected
               if (a == r) {
                  r[i] = null; // null-terminate
               } else if (a.length < i) {
                  return Arrays.copyOf(r, i);
               } else {
                  System.arraycopy(r, 0, a, 0, i);
                  if (a.length > i) {
                     a[i] = null;
                  }
               }
               return a;
            }
            r[i] = (T)it.next();
         }
         // more elements than expected
         return it.hasNext() ? finishToArray(r, it) : r;
      }
   }
594236
static public int asInt(byte[] array) {

        if (null == array || 4 != array.length) {
            throw new IllegalArgumentException("Length of the byte array should be 4");
        }

        return ((array[0] << 24)
                + ((array[1] & 255) << 16)
                + ((array[2] & 255) << 8) + (array[3] & 255));
    }
211586
static double min(double[] values) {
        double min = values[0];
        for (double value : values)
            if (value < min) min = value;
        return min;
    }
1287873
private static int getBytesSize(ArrayList<String> arr) {
        int count=0;
        
        for (String str : arr) {
            count = count + str.length();
        }
        return count;
    }
512992
static int min(int[] input, int start, int length) {
        assert length >= 1;

        int min = input[start];
        for (int i = length - 2, index = start + 1; i >= 0; i--, index++) {
            final int v = input[index];
            if (v < min) {
                min = v;
            }
        }

        return min;
    }
409040
public static int[] getDimensions( JSONArray jsonArray ) {
      // short circuit for empty arrays
      if( jsonArray == null || jsonArray.isEmpty() ){
         return new int[] { 0 };
      }

      List dims = new ArrayList();
      processArrayDimensions( jsonArray, dims, 0 );
      int[] dimensions = new int[dims.size()];
      int j = 0;
      for( Iterator i = dims.iterator(); i.hasNext(); ){
         dimensions[j++] = ((Integer) i.next()).intValue();
      }
      return dimensions;
   }
793430
@SafeVarargs
    public static byte min(final byte... a) {
        N.checkArgNotNullOrEmpty(a, "The spcified array 'a' can not be null or empty");

        return min(a, 0, a.length);
    }