List of utility methods to do List Max
int | getMaxStrWidth(List Returns the maximum string length of the list of strings int max = 0; for (String s : list) { if (s.length() > max) max = s.length(); return max; |
int | getMaxValIndex(List get Max Val Index Double maxVal = Double.MIN_VALUE; int maxValIndex = 0; int i = 0; for (Double val : vals) { if (val > maxVal) { maxVal = val; maxValIndex = i; i++; return maxValIndex; |
double | getMaxValue(List get Max Value double maxValue = 0; if (list == null) return 0; for (int i = 0; i < list.size(); i++) { if (list.get(i) == null) continue; double d = list.get(i); if (maxValue < d) ... |
double | getMaxValue(List get Max Value if (values.isEmpty()) { return -1.0; double max = -1.0; for (Double value : values) { if (max < value) { max = value; return max; |
Double | max(final List max Double max = aDefalut; if (null != aList) { for (Double value : aList) { if (null != value) { if (null == max) { max = value; } else { max = Math.max(max, value); ... |
double | max(List extends Number> values) max double max = Integer.MIN_VALUE; for (Number value : values) { if (value.doubleValue() > max) { max = value.doubleValue(); return max; |
List | max(List extends T> a, List extends T> b) max if (a == null) return (List<T>) b; if (b == null) return (List<T>) a; List<T> result = new ArrayList<T>(a); Map<T, Integer> coeffs = new HashMap<T, Integer>(); buildMap(a, coeffs); for (T t : b) { ... |
boolean | max(List Returns the max boolean in the booleans list. for (boolean value : booleans) { if (value) { return true; return false; |
double | max(List max return Collections.max(a);
|
double | max(List max Collections.sort(data); int n = data.size(); return data.get(n - 1); |