public static long max(long first, long... rest) {
        long max = first;
        for (long r : rest) {
            if (r > max)
                max = r;
        }
        return max;
    }
Get the maximum of some long values.
@param first Used to ensure at least one value
@param rest The remaining values to compare
@return The maximum of all passed values
clients/src/main/java/org/apache/kafka/common/utils/Utils.java