List of utility methods to do List Max
double | findMax(List find Max double m = Double.MIN_VALUE; for (Double x : nums) { if (m < x) m = x; return m; |
double | findMax(List find Max double max = Double.MIN_VALUE; for (Double d : values) { if (d > max) max = d; return max; |
int | findMaxDeformationCount(final List find Max Deformation Count double max = 0; for (int[] iA : counts) { max = Math.max(max, iA[iA.length - 1]); return (int) max; |
Map | findMaximalMatch(List For a list of Map find the entry that best matches the fieldsByPriority Ordered Map; null field values in a Map in mapList match against any value but do not contribute to maximal match score, otherwise value for each field in fieldsByPriority must match for it to be a candidate. int numFields = fieldsByPriority.size(); String[] fieldNames = new String[numFields]; Object[] fieldValues = new Object[numFields]; int index = 0; for (Map.Entry<String, Object> entry : fieldsByPriority.entrySet()) { fieldNames[index] = entry.getKey(); fieldValues[index] = entry.getValue(); index++; ... |
long | getMax(List numList) get Max long max = Long.MIN_VALUE; if (numList != null) { for (Iterator i = numList.iterator(); i.hasNext();) { max = Math.max(((Long) i.next()).longValue(), max); } else { max = -1; return max; |
Double | getMax(List get Max Iterator<Double> itr = aList.iterator(); if (aList.size() > 0) { Double max = aList.get(0); while (itr.hasNext()) { Double d = itr.next(); if (d > max) { max = d; return max; return null; |
double | getMax(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 | getMax(List get Max double max = -Double.MAX_VALUE; for (double d : list) { if (d > max) max = d; return max; |
double | getMax(List Finds the maximum from a list of Doubles. If the list is empty, 0 is returned. if (numbers.size() == 0) { return 0.0; double max = numbers.get(0); for (Double number : numbers) { max = Math.max(max, number); return max; ... |
Integer | getMax(List get Max if (list == null) { throw new IllegalArgumentException("Empty list not allowed"); Integer max = Integer.MAX_VALUE; for (Integer number : list) { max = Math.max(number, max); return max; ... |