Package ru.bgcrm.util
Class PatternFormatter
java.lang.Object
ru.bgcrm.util.PatternFormatter
Processor for substitution patterns like
(${key})(текст ${key1})}. Braces bound not mandatory area, being added only when for the key inside has defined a value.
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
PatternFormatter
public PatternFormatter()
-
-
Method Details
-
processPattern
Executes substitutions in a pattern.- Parameters:
pattern
- the pattern.processor
- values provider for found variables, providednull
values treated as empty strings.- Returns:
- pattern with applied substitutions.
-
processPattern
Executes substitutions in a pattern.- Parameters:
pattern
- the pattern.values
- variable values map, providednull
values treated as empty strings.- Returns:
- pattern with applied substitutions.
-