List of utility methods to do List Max
List | getMaxColumnSizes(List Gets a list of the maximum size for each column. List<Integer> maxColumnSizes = new ArrayList<Integer>(); for (int i = 0; i < resultSet.get(0).length; i++) { int maxColumnSize = -1; for (int j = 0; j < resultSet.size(); j++) { if (resultSet.get(j)[i].length() > maxColumnSize) { maxColumnSize = resultSet.get(j)[i].length(); maxColumnSizes.add(maxColumnSize); return maxColumnSizes; |
int | getMaxGYS(List get Max GYS int len = values.size(); if (len <= 1) { return 1; } else if (len == 2) { return getMaxGYS(values.get(0), values.get(1)); } else { int v1 = values.get(0); int v2 = values.get(1); ... |
String | getMaxId(List get Max Id String oozieId = ids.get(0); int maxInt = 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 > maxInt) { oozieId = currentId; return oozieId; |
List | getMaximums(List get Maximums 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 xMax; |
int | getMaxLength(List get Max Length int max = 0; for (String value : values) { max = max < value.length() ? value.length() : max; return max; |
int | getMaxLineWidth(final List get Max Line Width int max = 0; if (str != null && !str.isEmpty()) { for (final String s : str) { if (s != null && s.length() > max) { max = s.length(); return max; |
String | getMaxListStringFromList(List get Max List String From List String theDay = null; for (String day : days) { if (theDay == null || day.compareTo(theDay) > 0) { theDay = day; return theDay; |
int | getMaxOf(final List Useful function that return the maximum of an integer list int max = 0; for (final int i : list) { max = i > max ? i : max; return max; |
double | getMaxOfAList(List Get the maximum double of a list of array of doubles double max = 0; for (Double[] doubles : list) { Arrays.sort(doubles); double tempMax = doubles[doubles.length - 1]; if (tempMax > max) { max = tempMax; return max; |
int | getMaxSize(final List> list) get Max Size return list.size() > 4 ? 4 : list.size();
|