private static boolean isValidFieldGlob(String name){
  if (name.startsWith("*") || name.endsWith("*")) {
    int count=0;
    for (int pos=0; pos < name.length() && -1 != (pos=name.indexOf('*',pos)); ++pos)     ++count;
    if (1 == count)     return true;
  }
  return false;
}

private static boolean isValidFieldGlob ( String name ) { if ( name . startsWith ( "*" ) || name . endsWith ( "*" ) ) { int count = 0 ; for ( int pos = 0 ; pos < name . length ( ) && - 1 != ( pos = name . indexOf ( '*' , pos ) ) ; ++ pos ) ++ count ; if ( 1 == count ) return true ; } return false ; }
returns true if the given name has exactly one asterisk either at the start or end of the name
