String (String classGenericName, Collection<String> typeParamStrings) { String result = classGenericName; if (typeParamStrings.contains(classGenericName)) { int counter = 2; do { result = classGenericName + counter++; } while (typeParamStrings.contains(result)); } return result; }