if (a == null) return b; if (b == null) return a; int c = a.compareTo(b); return c < 0 ? b : a;
return first.compareTo(second) < 0 ? second : first;
if (values == null || values.length == 0) { throw new IllegalArgumentException(); BigInteger maxValue = null; for (final BigInteger value : values) { if (value == null) { throw new IllegalArgumentException(); if (maxValue == null) { maxValue = value; } else { maxValue = maxValue.max(value); return maxValue;