Java Utililty Methods Integer to Char

List of utility methods to do Integer to Char

Description

The list of methods to do Integer to Char are organized into topic(s).

Method

charintToChar(int i)
Converts number to character.
char c = PAD_CHAR;
if (i >= 0) {
    if (i < 26) {
        c = (char) ('A' + i);
    } else if (i < 52) {
        c = (char) ('a' + i - 26);
    } else if (i < 62) {
        c = (char) ('0' + i - 52);
...
charintToChar(int i)
Translate between a throw height specified as an int and it's representation in the alphabet we use to denote siteswaps (0 through Z).
if (i < 0 || i > 35)
    throw new Exception("int out of bounds");
if (i < 9)
    return (char) ('0' + i);
else
    return (char) ('a' + i - 10);
charintToChar(int i)
int To Char
if (i < 36)
    return Character.forDigit(i, 36);
else
    return Character.toUpperCase(Character.forDigit(i - 26, 36));
CharacterintToCharacter(int i)
int To Character
if (i >= Character.MIN_VALUE && i <= Character.MAX_VALUE) {
    return (char) i;
return null;
voidintToChars(int value, char[] chars, int offset)
int To Chars
chars[offset] = (char) (value >> 16);
chars[offset + 1] = (char) (value & 0x0000FFFF);