private static boolean checkName(EditableResources r,String name){
  for (  String n : r.getResourceNames()) {
    if (n.equals(name)) {
      return true;
    }
  }
  return false;
}

private static boolean checkName ( EditableResources r , String name ) { for ( String n : r . getResourceNames ( ) ) { if ( n . equals ( name ) ) { return true ; } } return false ; }
returns true if the name already exists in the resources
