List of utility methods to do List Min
double | findMin(List find Min double m = Double.MAX_VALUE; for (Double x : nums) { if (m > x) m = x; return m; |
double | findMin(List find Min double min = Double.MAX_VALUE; for (double d : values) { if (d < min) min = d; return min; |
long | getMin(List numList) get Min long min = Long.MAX_VALUE; if (numList != null) { for (Iterator i = numList.iterator(); i.hasNext();) { min = Math.min(((Long) i.next()).longValue(), min); } else { min = -1; return min; |
Double | getMin(List Finds the lowest positive double in a list. Double lowest = Double.POSITIVE_INFINITY; boolean check = false; for (Iterator<Double> iterator = aList.iterator(); iterator.hasNext();) { Double d = iterator.next(); if (lowest >= d && d > 0) { lowest = d; check = true; if (check) { return lowest; } else { return -1.0; |
double | getMin(List Returns the maximum value of an Arraylist with doubles double res = Double.MAX_VALUE; for (Double db : d) { if (db < res) res = db; return res; |
double | getMin(List Finds the minimum from a list of Doubles. If the list is empty, 0 is returned. if (numbers.size() == 0) { return 0.0; double min = numbers.get(0); for (Double number : numbers) { min = Math.min(min, number); return min; ... |
String | getMinId(List get Min Id String oozieId = ids.get(0); int minInt = Integer.valueOf(oozieId.split("-")[0]); for (int i = 1; i < ids.size(); i++) { String currentId = ids.get(i); int currInt = Integer.valueOf(currentId.split("-")[0]); if (currInt < minInt) { oozieId = currentId; return oozieId; |
List | getMinimums(List get Minimums List<Double> xMin = new ArrayList<Double>(); List<Double> yMin = new ArrayList<Double>(); List<Double> xMax = new ArrayList<Double>(); List<Double> yMax = new ArrayList<Double>(); getPeriodBounds(data, data, xMin, yMin, xMax, yMax); return xMin; |
double | getMinValue(List get Min Value if (values.isEmpty()) { return -1.0; double min = Double.MAX_VALUE; for (Double value : values) { if (value < min) { min = value; return min; |
int | getMinWhitespace(final List Gets the minimum amount of leading whitespace in a text block. int minWhitespace = 0; for (String line : lines) { int lineLeadingWhitespace = getLeadingWhitespace(line); if (lineLeadingWhitespace < minWhitespace || minWhitespace == 0) { minWhitespace = lineLeadingWhitespace; return minWhitespace; ... |