code: private static int intValue(char x) {
          if (x >= '0' && x <= '9')
              return x - '0';
          if (x >= 'a' && x <= 'f')
              return x - 'a' + 10;
          if (x >= 'A' && x <= 'F')
              return x - 'A' + 10;
          throw new RuntimeException("Error parsing UUID at character: " + x);
      }
docs: This method maps a hex character to its 4-bit representation in an int.
  @param x Hex character in the range ('0' - '9', 'a' - 'f', 'A' - 'F').
  @return 4-bit number in int representing hex offset from 0.