code: public static char intToHexDigit(final int nibble) {
          final char c = Character.forDigit(nibble, 16);
          if (c == Character.MIN_VALUE) {
              throw new IllegalArgumentException("nibble value not between 0 and 15: " + nibble);
          }
          return c;
      }
docs: <p>
  Converts the 4 lsb of an int to a hexadecimal digit.
  </p>
  <p>
  0 returns '0'
  </p>
  <p>
  1 returns '1'
  </p>
  <p>
  10 returns 'A' and so on...
  </p>
  
  @param nibble the 4 bits to convert
  @return a hexadecimal digit representing the 4 lsb of {@code nibble}
  @throws IllegalArgumentException if {@code nibble < 0} or {@code nibble > 15}