question: protected 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 ; }
target:  Returns true if the given name has exactly one asterisk either at the start or end of the name 