code: public static int stringCode (String value, StringBuilder encoded)
      {
          int code = 0;
          for (int ii = 0, uu = 0; ii < value.length(); ii++) {
              char c = Character.toLowerCase(value.charAt(ii));
              Integer cc = _letterToBits.get(c);
              if (cc == null) {
                  continue;
              }
              code += cc.intValue();
              if (encoded != null) {
                  encoded.append(c);
              }
              if (++uu == 8) {
                  break;
              }
              code <<= 4;
          }
          return code;
      }
docs: Encodes (case-insensitively) a short English language string into a semi-unique
  integer. This is done by selecting the first eight characters in the string that fall into
  the set of the 16 most frequently used characters in the English language and converting
  them to a 4 bit value and storing the result into the returned integer.
  
  <p> This method is useful for mapping a set of string constants to a set of unique integers
  (e.g. mapping an enumerated type to an integer and back without having to require that the
  declaration order of the enumerated type remain constant for all time). The caller must, of
  course, ensure that no collisions occur.
  
  @param value the string to be encoded.
  @param encoded if non-null, a string buffer into which the characters used for the encoding
  will be recorded.