Conditions | 2 |
Total Lines | 17 |
Code Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | package com.osomapps.pt.tokenemail; |
||
25 | @Override |
||
26 | public String apply(Map<K, V> value) { |
||
27 | final String evaluate = TEMPLATE_SETTINGS.get("evaluate"); |
||
28 | String result = template; |
||
29 | for (final Map.Entry<K, V> element : value.entrySet()) { |
||
30 | result = |
||
31 | java.util.regex.Pattern.compile( |
||
32 | evaluate.replace( |
||
33 | ALL_SYMBOLS, |
||
34 | "\\s*" |
||
35 | + java.util.regex.Pattern.quote( |
||
36 | String.valueOf(element.getKey())) |
||
37 | + "\\s*")) |
||
38 | .matcher(result) |
||
39 | .replaceAll(String.valueOf(element.getValue())); |
||
40 | } |
||
41 | return result; |
||
42 | } |
||
49 |