List of utility methods to do Number Max Value
Integer | max(Iterable max Integer result = null; for (Integer num : nums) { if (result == null || num > result) { result = num; return result; |
long | max(long a, long b) max return a > b ? a : b;
|
Number | max(Number a, Number b) Returns the greater of the two given numbers. return (a.doubleValue() > b.doubleValue()) ? a : b;
|
Number | max(Number n0, Number n1) Returns the maximum (double) of the given values. If either value is null , then the other value will be returned.
if (n0 == null) { return n1; if (n1 == null) { return n0; double d0 = n0.doubleValue(); double d1 = n1.doubleValue(); ... |
Number | max(Number num1, Number num2) max return (num1.doubleValue() > num2.doubleValue()) ? num1 : num2;
|
char | Max(Object in) Max char out = 0; if (in == null) return 0; if (in instanceof char[]) { char[] inn = (char[]) in; for (int i = 0, s = inn.length; i < s; i++) out = Max(out, inn[i]); return out; ... |
Number | max(Object o1, Object o2) max Number n1 = getValue(o1); Number n2 = getValue(o2); if (n1 == null) return n2; if (n2 == null) return n1; if (n1.doubleValue() > n2.doubleValue()) return n1; ... |
String | max(String a, String b) max if (a == null && b == null) { return null; if (a != null && b == null) { return a; if (b != null && a == null) { return b; ... |
String | max(String content, int max, String dotDotDot) max if (content == null) return null; if (content.length() <= max) return content; return content.substring(0, max) + dotDotDot; |
String | max(String left, String right) max return left.compareTo(right) < 0 ? right : left;
|