public static boolean matches(String pattern, CharSequence input) {
        input = new InterruptibleCharSequence(input);
        Matcher m = getMatcher(pattern, input);
        boolean res = m.matches();
        recycleMatcher(m);
        return res;
    }
public static boolean matches ( String pattern , CharSequence input ) { input = new InterruptibleCharSequence ( input ) ; Matcher m = getMatcher ( pattern , input ) ; boolean res = m . matches ( ) ; recycleMatcher ( m ) ; return res ; }
Utility method using a precompiled pattern instead of using the matches
method of the String class. This method will also be reusing Matcher
objects.

@see java.util.regex.Pattern
@param pattern precompiled Pattern to match against
@param input the character sequence to check
@return true if character sequence matches