public Matcher usePattern(Pattern newPattern) {
        if (newPattern == null) {
            throw new IllegalArgumentException("newPattern cannot be null");
        }
        this.parentPattern = newPattern;
        matcher.usePattern(newPattern.pattern());
        return this;
    }
public Matcher usePattern(Pattern newPattern) {
        if (newPattern == null) {
            throw new IllegalArgumentException("newPattern cannot be null");
        }
        this.parentPattern = newPattern;
        matcher.usePattern(newPattern.pattern());
        return this;
    }
public Matcher usePattern ( Pattern newPattern ) { if ( newPattern == null ) { throw new IllegalArgumentException ( "newPattern cannot be null" ) ; } this . parentPattern = newPattern ; matcher . usePattern ( newPattern . pattern ( ) ) ; return this ; }
Changes the Pattern that this Matcher uses to find matches with

@param newPattern the new pattern
@return this Matcher
Changes the Pattern that this Matcher uses to find matches with