public boolean matches ( CharSequence input ) { separatorCount = - 1 ; separatorIndex = 0 ; if ( input == null ) { this . input = null ; separatorFlags = null ; return false ; } this . input = input ; separatorFlags = new int [ input . length ( ) ] ; boolean result = matches ( pattern , input , separatorFlags ) ; if ( result ) { for ( int i = separatorFlags . length - 1 ; i >= 0 ; i -- ) { if ( separatorFlags [ i ] > 0 ) { separatorCount = separatorFlags [ i ] ; break ; } } } return result ; }
Checks whether a string matches a given wildcard pattern .