List of utility methods to do Number Max Value
String | max(String name) _more_ return " max(" + validName(name) + ")"; |
String | max(String s) String promotion - returns either the given string or empty string (if given string is null). return s == null ? "" : s; |
T | max(T a, T b) Generalized version of Math.max if (a.compareTo(b) <= 0) return b; return a; |
T | max(T a, T b) Compares two objects finding the maximum. if (a != null && b != null) { return a.compareTo(b) >= 0 ? a : b; if (a == null) { if (b == null) { return null; } else { return b; ... |
T | max(T c1, T c2) Null safe comparison of Comparables. if (c1 != null && c2 != null) { return c1.compareTo(c2) >= 0 ? c1 : c2; } else { return c1 != null ? c1 : c2; |
T | max(T c1, T c2) Gets maximal value between given two. if (c1 == c2) return c1; if (c1 == null) return c2; if (c2 == null) return c1; return c1.compareTo(c2) >= 0 ? c1 : c2; |
T | max(T v1, T v2) max return v1.compareTo(v2) < 0 ? v2 : v1;
|
T | max(T v1, T v2, int nullSupport) max if (v1 == v2) return v1; if (v1 == null) { return nullSupport == NULL_IS_MAXIMUM ? v1 : v2; if (v2 == null) { return nullSupport == NULL_IS_MAXIMUM ? v2 : v1; int v = v1.compareTo(v2); return (v < 0) ? v2 : v1; |
double | max2(double a, double b) max return a > b ? a : b;
|
int | max2(int a, int b) max if (a > b) return a; return b; |