static String createUniqueName(String name,List<String> names){
  String result=name;
  if (name != null && names != null && !names.isEmpty()) {
    boolean found=false;
    for (    String currentName : names) {
      if (name.equals(currentName)) {
        found=true;
        break;
      }
    }
    if (found) {
      result=createUniqueName(name + "1",names);
    }
  }
  return result;
}

static String createUniqueName ( String name , List < String > names ) { String result = name ; if ( name != null && names != null && ! names . isEmpty ( ) ) { boolean found = false ; for ( String currentName : names ) { if ( name . equals ( currentName ) ) { found = true ; break ; } } if ( found ) { result = createUniqueName ( name + "1" , names ) ; } } return result ; }
given a name modify it if necessary to make it unique within a list of names
