int (@Nullable String value) { if (value == null) { return 0; } assert myEnumerates != null; // enumerate possible only when writing stub int i = myEnumerates.getInt(value); if (i == 0) { myEnumerates.put(value, i = myStrings.size() + 1); myStrings.add(value); } return i; }