code: private int getIntKeyForString(ArrayList<String> uniqueStrings, Object value) {
      String stringValue = String.valueOf(value);
      int retval = uniqueStrings.indexOf(stringValue);
      if (retval < 0) {
        retval = uniqueStrings.size();
        uniqueStrings.add(stringValue);
      }
      return retval;
    }
docs: Helper method to get, or assign, a unique key to a string,
  from an ArrayList containing the unique keys.
  @param uniqueStrings Current set of unique strings
  @param value Object to convert to a string, and find/assign an number for
  @return number associated with the unique string