static boolean isSimpleName(String s){
  for (  char c : s.toCharArray()) {
    if (c != '.' && c != '_' && c != '-' && !Character.isLetterOrDigit(c)) {
      return false;
    }
  }
  return true;
}

static boolean isSimpleName ( String s ) { for ( char c : s . toCharArray ( ) ) { if ( c != '.' && c != '_' && c != '-' && ! Character . isLetterOrDigit ( c ) ) { return false ; } } return true ; }
check if this is a simple name ( only contains ' . ' , ' - ' , ' _ ' , letters , or digits ) .
