private boolean isStringTokenMatched ( AnalyzedToken token ) { String testToken = getTestToken ( token ) ; if ( stringRegExp ) { Matcher m = pattern . matcher ( new InterruptibleCharSequence ( testToken ) ) ; return m . matches ( ) ; } if ( caseSensitive ) { return stringToken . equals ( testToken ) ; } return stringToken . equalsIgnoreCase ( testToken ) ; }
Tests whether the string token element matches a given token .