private static class NounInflector.Replacer
extends java.lang.Object
Internal class that uses a regular expression matcher to both match the specified regular expression to a specified word, and (if successful) perform the appropriate substitutions.
Modifier and Type | Field and Description |
---|---|
private java.util.regex.Pattern |
pattern |
private java.lang.String |
rule |
Constructor and Description |
---|
Replacer(java.lang.String match,
java.lang.String rule,
boolean insensitive) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
replacement(java.lang.String input)
Replace the input if it matches the pattern.
|