String (String name, boolean increaseNumber) { if (!mySet.contains(name)) return name; if (increaseNumber) { int i = 1; //noinspection StatementWithEmptyBody for (; mySet.contains(name + i); i++) ; return name + i; } else { return ""; } }