@@ -129,6 +129,33 @@ public String apply(Map<K, V> value) {
129129 }
130130 return result ;
131131 }
132+
133+ @ Override
134+ public List <String > check (Map <K , V > value ) {
135+ final String evaluate = TEMPLATE_SETTINGS .get ("evaluate" );
136+ final String interpolate = TEMPLATE_SETTINGS .get ("interpolate" );
137+ final String escape = TEMPLATE_SETTINGS .get ("escape" );
138+ String result = template ;
139+ final List <String > notFound = new ArrayList <String >();
140+ for (final Map .Entry <K , V > element : value .entrySet ()) {
141+ java .util .regex .Matcher matcher = java .util .regex .Pattern .compile (interpolate .replace (ALL_SYMBOLS ,
142+ "\\ s*\\ Q" + ((Map .Entry ) element ).getKey () + "\\ E\\ s*" )).matcher (result );
143+ boolean isFound = matcher .find ();
144+ result = matcher .replaceAll (String .valueOf (((Map .Entry ) element ).getValue ()));
145+ matcher = java .util .regex .Pattern .compile (escape .replace (ALL_SYMBOLS ,
146+ "\\ s*\\ Q" + ((Map .Entry ) element ).getKey () + "\\ E\\ s*" )).matcher (result );
147+ isFound |= matcher .find ();
148+ result = matcher .replaceAll (escape (String .valueOf (((Map .Entry ) element ).getValue ())));
149+ matcher = java .util .regex .Pattern .compile (evaluate .replace (ALL_SYMBOLS ,
150+ "\\ s*\\ Q" + ((Map .Entry ) element ).getKey () + "\\ E\\ s*" )).matcher (result );
151+ isFound |= matcher .find ();
152+ result = matcher .replaceAll (String .valueOf (((Map .Entry ) element ).getValue ()));
153+ if (!isFound ) {
154+ notFound .add ("" + ((Map .Entry ) element ).getKey ());
155+ }
156+ }
157+ return notFound ;
158+ }
132159 }
133160
134161 private static final class MyIterable <T > implements Iterable <T > {
0 commit comments