String (String name, boolean increaseNumber) { String result = name; if (!isOKImpl(name, true).isEmpty() && !increaseNumber || name.isEmpty()) { return ""; } int i = 1; while (!isOKImpl(result, true).isEmpty()) { result = name + i; i++; } return result; }