public class StringReplacementAlgo extends Object implements SubstitutionAlgorithm
Constructor and Description |
---|
StringReplacementAlgo(Map<String,String> substitutionMap)
Construct
StringReplacementAlgo for the given substitutable key/value
pair. |
Modifier and Type | Method and Description |
---|---|
void |
substitute(Substitutable resolver)
Perform's string substitution.
|
public StringReplacementAlgo(Map<String,String> substitutionMap)
StringReplacementAlgo
for the given substitutable key/value
pair.substitutionMap
- Map of substitutable key/value pairs.public void substitute(Substitutable resolver) throws StringSubstitutionException
SubstitutionAlgorithm
Reads the character stream from the given Substitutable
object,
perform substitution and writes it back to the object.
substitute
in interface SubstitutionAlgorithm
resolver
- Provide input and output stream.StringSubstitutionException
- If any error occurs during substitution operation.Copyright © 2019. All rights reserved.