Class SimilarNamedWays.SynonymRule
- java.lang.Object
-
- org.openstreetmap.josm.data.validation.tests.SimilarNamedWays.SynonymRule
-
- All Implemented Interfaces:
SimilarNamedWays.NormalizeRule
- Enclosing class:
- SimilarNamedWays
public static class SimilarNamedWays.SynonymRule extends Object implements SimilarNamedWays.NormalizeRule
A rule that registers synonyms to a given word
-
-
Constructor Summary
Constructors Constructor Description SynonymRule(String replacement, String... words)
Create a newSimilarNamedWays.SynonymRule
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
normalize(String name)
Normalize the string by replacing parts.String
toString()
-
-
-
Constructor Detail
-
SynonymRule
public SynonymRule(String replacement, String... words)
Create a newSimilarNamedWays.SynonymRule
- Parameters:
replacement
- The word to use insteadwords
- The synonyms for that word
-
-
Method Detail
-
normalize
public String normalize(String name)
Description copied from interface:SimilarNamedWays.NormalizeRule
Normalize the string by replacing parts.- Specified by:
normalize
in interfaceSimilarNamedWays.NormalizeRule
- Parameters:
name
- name to normalize- Returns:
- normalized string
-
-