public static synchronized boolean isNumeric(Object object)
    {
        boolean is_digits = false;
        boolean has_decimal = false;

        String string = "";

        if (object == null)
            return false;
        // NOTE: byte, int, long, doubble, etc. all derive from number
        //		which by nature must be numeric
        if (object instanceof Number)
            return true;
        // try and convert everything else to a string and evaluate
        string = toString(object);
        if (string.length() > 0)
        {
            is_digits = true;
            char[] chars = string.toCharArray();
            for (int x = 0; x < chars.length; x++)
            {
                if (x == 0 && chars[x] == '-')
                    continue;
                if (!Character.isDigit(chars[x]))
                {
                    // we allow 1 and only 1 decimal
                    if ((Character.toString(chars[x])).equalsIgnoreCase("."))
                    {
                        if (has_decimal)
                        {
                            is_digits = false;
                            break;
                        }
                        else
                            has_decimal = true;
                    }
                    else
                    {
                        is_digits = false;
                        break;
                    }
                }
            }
        }
        return is_digits;
    }