question: private boolean matches ( String selector , String name ) { if ( selector . equals ( "*" ) ) { return true ; } if ( selector . endsWith ( ".*" ) ) { return name . startsWith ( selector . substring ( 0 , selector . length ( ) - 1 ) ) ; } return name . equals ( selector ) ; }
target:  Check whether a name matches selector.