@Test public void testDigitValueError() throws IllegalArgumentException { boolean ret = true; try { TextUtils.digitValue('!'); } catch(IllegalArgumentException e) { ret = false; } assertFalse(ret); }
public static int digitValue(final char c) { if ('0' <= c && c <= '9') { return c - '0'; } else if ('a' <= c && c <= 'z') { return c - 'a' + 10; } else if ('A' <= c && c <= 'Z') { return c - 'A' + 10; } else { throw new IllegalArgumentException("Expected \"0-9\" or \"a-z, A-Z\"."); } }
TextUtils { public static int digitValue(final char c) { if ('0' <= c && c <= '9') { return c - '0'; } else if ('a' <= c && c <= 'z') { return c - 'a' + 10; } else if ('A' <= c && c <= 'Z') { return c - 'A' + 10; } else { throw new IllegalArgumentException("Expected \"0-9\" or \"a-z, A-Z\"."); } } }
TextUtils { public static int digitValue(final char c) { if ('0' <= c && c <= '9') { return c - '0'; } else if ('a' <= c && c <= 'z') { return c - 'a' + 10; } else if ('A' <= c && c <= 'Z') { return c - 'A' + 10; } else { throw new IllegalArgumentException("Expected \"0-9\" or \"a-z, A-Z\"."); } }  }
TextUtils { public static int digitValue(final char c) { if ('0' <= c && c <= '9') { return c - '0'; } else if ('a' <= c && c <= 'z') { return c - 'a' + 10; } else if ('A' <= c && c <= 'Z') { return c - 'A' + 10; } else { throw new IllegalArgumentException("Expected \"0-9\" or \"a-z, A-Z\"."); } }  static String unsignedToString(final long value); static String unsignedToString(final int value); static Integer unsignedInt(int value); static Long unsignedLong(long value); static boolean isHex(final char c); static boolean isOctal(final char c); static int digitValue(final char c); static boolean isDigits(final String text); static StringBuilder toStringBuilder(Readable input); static InputStream toInputStream(String input); static InputStream toInputStream(String input, Charset cs); static double parseDouble(final String text); static float parseFloat(final String text); static boolean parseBoolean(final String text); static int parseInt32(final String text); static int parseUInt32(final String text); static long parseInt64(final String text); static long parseUInt64(final String text); static long parseInteger(final String text,
            final boolean isSigned, final boolean isLong); static String escapeBytes(final ByteString input); static ByteString unescapeBytes(final CharSequence charString); }
TextUtils { public static int digitValue(final char c) { if ('0' <= c && c <= '9') { return c - '0'; } else if ('a' <= c && c <= 'z') { return c - 'a' + 10; } else if ('A' <= c && c <= 'Z') { return c - 'A' + 10; } else { throw new IllegalArgumentException("Expected \"0-9\" or \"a-z, A-Z\"."); } }  static String unsignedToString(final long value); static String unsignedToString(final int value); static Integer unsignedInt(int value); static Long unsignedLong(long value); static boolean isHex(final char c); static boolean isOctal(final char c); static int digitValue(final char c); static boolean isDigits(final String text); static StringBuilder toStringBuilder(Readable input); static InputStream toInputStream(String input); static InputStream toInputStream(String input, Charset cs); static double parseDouble(final String text); static float parseFloat(final String text); static boolean parseBoolean(final String text); static int parseInt32(final String text); static int parseUInt32(final String text); static long parseInt64(final String text); static long parseUInt64(final String text); static long parseInteger(final String text,
            final boolean isSigned, final boolean isLong); static String escapeBytes(final ByteString input); static ByteString unescapeBytes(final CharSequence charString);  }