public static boolean isNumeric(CharSequence cs) {
        if (cs == null || cs.length() == 0) {
            return false;
        }
        int sz = cs.length();
        for (int i = 0; i < sz; i++) {
            if (Character.isDigit(cs.charAt(i)) == false) {
                return false;
            }
        }
        return true;
    }
<p>Checks if the CharSequence contains only Unicode digits.
A decimal point is not a Unicode digit and returns false.</p>

<p>{@code null} will return {@code false}.
An empty CharSequence (length()=0) will return {@code false}.</p>

<pre>
StringUtils.isNumeric(null)   = false
StringUtils.isNumeric("")     = false
StringUtils.isNumeric("  ")   = false
StringUtils.isNumeric("123")  = true
StringUtils.isNumeric("12 3") = false
StringUtils.isNumeric("ab2c") = false
StringUtils.isNumeric("12-3") = false
StringUtils.isNumeric("12.3") = false
</pre>

@param cs  the CharSequence to check, may be null
@return {@code true} if only contains digits, and is non-null
@since 3.0 Changed signature from isNumeric(String) to isNumeric(CharSequence)
@since 3.0 Changed "" to return false and not true
android/android_framework/base/src/main/java/lang3/StringUtils.java