Add toString overloaded method to PatternBuilder class