Replies the min value.

@param values are the values to scan.
@return the min value.
350120
@Pure
	public static double min(double... values) {
		if (values == null || values.length == 0) {
			return Double.NaN;
		}
		double min = values[0];
		for (final double v : values) {
			if (v < min) {
				min = v;
			}
		}
		return min;
	}
24824
public static int binarySearchValueOrLower(ListNumber values, double value) {
        if (value <= values.getDouble(0)) {
            return 0;
        }
        if (value >= values.getDouble(values.size() -1)) {
            return values.size() - 1;
        }
        
        int index = binarySearch(0, values.size() - 1, values, value);
        
        while (index != 0 && value == values.getDouble(index - 1)) {
            index--;
        }
        
        return index;
    }
890284
public static int getMaxValue (int[] values)
    {
        int max = Integer.MIN_VALUE;
        int vcount = (values == null) ? 0 : values.length;
        for (int ii = 0; ii < vcount; ii++) {
            if (values[ii] > max) {
                // new max
                max = values[ii];
            }
        }
        return max;
    }
1035979
public StringExpression min() {
        if (min == null) {
            min = Expressions.stringOperation(Ops.AggOps.MIN_AGG, mixin);
        }
        return min;
    }
1257264
public static boolean isEmpty(final String... values) {
		if (values == null || values.length == 0)
			return true;
		for (String value : values)
			if (value == null || value.length() == 0)
				return true;
		return false;
	}
470554
public static int[] getMaxIndexes (int[] values)
    {
        int max = Integer.MIN_VALUE;
        int num = 0;
        int vcount = (values == null) ? 0 : values.length;

        for (int ii=0; ii < vcount; ii++) {
            int value = values[ii];

            if (value < max) {
                // common case- stop checking things..
                continue;

            } else if (value > max) {
                // new max
                max = value;
                num = 1;

            } else {
                // another sighting of max
                num++;
            }
        }

        // now find the indexes that have max
        int[] maxes = new int[num];
        for (int ii=0, pos=0; pos < num; ii++) {
            if (values[ii] == max) {
                maxes[pos++] = ii;
            }
        }

        return maxes;
    }
114951
public static double min(double... nums) {
    double min = nums[0];
    for (int i = 1; i < nums.length; i++) {
      if (nums[i] > min) {
        min = nums[i];
      }
    }
    return min;
  }
1313849
public static /*@pure@*/ int minIndex(int[] ints) {

    int minimum = 0;
    int minIndex = 0;

    for (int i = 0; i < ints.length; i++) {
      if ((i == 0) || (ints[i] < minimum)) {
	minIndex = i;
	minimum = ints[i];
      }
    }

    return minIndex;
  }
1297643
public static BigDecimal sub(Number... values) {
		if (ArrayUtil.isEmpty(values)) {
			return BigDecimal.ZERO;
		}

		Number value = values[0];
		BigDecimal result = new BigDecimal(null == value ? "0" : value.toString());
		for (int i = 1; i < values.length; i++) {
			value = values[i];
			if (null != value) {
				result = result.subtract(new BigDecimal(value.toString()));
			}
		}
		return result;
	}
1206268
public static <T extends Comparable<T>> T minOr(Collection<T> values, T defaultVal) {
    if (values.isEmpty()) {
      return defaultVal;
    } else {
      return Collections.min(values);
    }
  }
1364174
public void setValues(
                    final Collection<?> values
                    )
    {
        if (values != _values) {
            clear();
            if (values == null  ||  values.size() == 0) {
                return;
            }

            for (Object  value : values) {
                addValue( value );
            }
        }
    }
1073527
public static double max(double[][] values) {
    double max = 0;
    for (int i = 0; i < values.length; i++) {
      for (int j = 0; j < values[i].length; j++) {
        max = (values[i][j] > max) ? values[i][j] : max;
      }
    }
    return max;
  }
110887
public double min(double[] series) {
    double min = Double.MAX_VALUE;
    for (int i = 0; i < series.length; i++) {
      if (min > series[i]) {
        min = series[i];
      }
    }
    return min;
  }
961886
@Override
    public <N extends Number> Expression<N> min(Expression<N> arg0)
    {
        // TODO Auto-generated method stub
        return null;
    }
1077036
public void setValues(final Set<String> values) {
        getValues().clear();
        if (values == null) {
            return;
        }
        getValues().addAll(values);
    }
1262279
public static <T> T pick(List<T> values) {
		if (values == null || values.size() == 0)
			return null;

		int index = RandomInteger.nextInteger(values.size());
		return values.get(index);
	}
1229851
public static String pick(String[] values) {
		if (values == null || values.length == 0)
			return "";

		int index = RandomInteger.nextInteger(values.length);
		return values[index];
	}