Java Number Max Value Max(Object in)

Here you can find the source of Max(Object in)

Description

Max

License

Open Source License

Declaration

public static final char Max(Object in) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static final char Max(Object in) {
        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]);/*  w w w .  j  a va2  s .c om*/
            return out;
        } else {
            for (int i = 0, s = ((Object[]) in).length; i < s; i++)
                out = Max(out, Max(((Object[]) in)[i]));
            return out;
        }
    }

    public static final char Max(char x1, char x2) {
        return (x1 > x2 ? x1 : x2);
    }

    public static final char Max(char x1, char x2, char x3) {
        return Max(x1, Max(x2, x3));
    }

    public static final char Max(char x1, char x2, char x3, char x4) {
        return Max(Max(x1, x2), Max(x3, x4));
    }
}

Related

  1. max(Iterable nums)
  2. max(long a, long b)
  3. max(Number a, Number b)
  4. max(Number n0, Number n1)
  5. max(Number num1, Number num2)
  6. max(Object o1, Object o2)
  7. max(String a, String b)
  8. max(String content, int max, String dotDotDot)
  9. max(String left, String right)