List of utility methods to do List Max
double | max(List max double max = 0.0; for (Double d : l) if (d > max) max = d; return max; |
double | max(List max if (liste.isEmpty()) { return 0.0; double max = -Double.MAX_VALUE; for (Double val : liste) { max = Math.max(max, val.doubleValue()); return max; ... |
List | max(List Returns a sublist of the given List with the maximum given size. final List<E> retlist = new ArrayList<E>(); if (list != null && maximumSize >= 0) { retlist.addAll(list.subList(0, Math.min(list.size(), maximumSize))); return retlist; |
String | max(List max long max = Long.MIN_VALUE; for (long value : runtimeList) { max = Math.max(max, value); return String.valueOf(max); |
Number | max(List max Number answer = null; double answerValue = Double.MIN_VALUE; for (Number number : numberList) { if (number.doubleValue() > answerValue) { answerValue = number.doubleValue(); answer = number; return answer; |
T | max(List max T highest = numbers.get(0); for (T n : numbers) { if (n.doubleValue() > highest.doubleValue()) { highest = n; return highest; |
T | max(List max assert !objectList.isEmpty(); if (objectList.isEmpty()) { throw new IllegalArgumentException("Number List was empty."); T max = objectList.get(0); for (int i = 1; i < objectList.size(); i++) { if (objectList.get(i).doubleValue() > max.doubleValue()) { max = objectList.get(i); ... |
V | max(List max if (arg == null) { return null; if (arg.size() == 1) { return arg.get(0); V max = arg.get(0); for (V each : arg) { ... |
double | maxAbsVal(List vals) Get the maximum absolute value int num = vals.size(); double maxVal = Double.NEGATIVE_INFINITY; for (int i = 0; i < num; i++) { Double val0bj = (Double) vals.get(i); if (val0bj.isNaN()) { return (val0bj.doubleValue()); double val = Math.abs(val0bj.doubleValue()); ... |
int | maxIndex(List max Index T max = null; ; int i = 0; int maxindex = -1; for (T t : list) { if (max == null || t.compareTo(max) > 0) { max = t; maxindex = i; ... |