Ignore:
Timestamp:
2017-06-11T13:39:33+02:00 (7 years ago)
Author:
michael2402
Message:

See #14794: Document data.validation package and subpackages.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/validation/tests/SimilarNamedWays.java

    r12283 r12390  
    235235    }
    236236
     237    /**
     238     * A normalization that is applied to names before testing them
     239     */
    237240    @FunctionalInterface
    238241    public interface NormalizeRule {
     
    246249    }
    247250
     251    /**
     252     * A rule to replace by regular expression,
     253     * so that all strings matching the regular expression are handled as if they were {@link RegExprRule#replacement}
     254     */
    248255    public static class RegExprRule implements NormalizeRule {
    249256        private final Pattern regExpr;
    250257        private final String replacement;
    251258
     259        /**
     260         * Create a new rule to replace by regular expression
     261         * @param expression The regular expression
     262         * @param replacement The replacement
     263         */
    252264        public RegExprRule(String expression, String replacement) {
    253265            this.regExpr = Pattern.compile(expression);
     
    266278    }
    267279
     280    /**
     281     * A rule that registers synonyms to a given word
     282     */
    268283    public static class SynonymRule implements NormalizeRule {
    269284
     
    272287        private final String replacement;
    273288
     289        /**
     290         * Create a new {@link SynonymRule}
     291         * @param replacement The word to use instead
     292         * @param words The synonyms for that word
     293         */
    274294        public SynonymRule(String replacement, String... words) {
    275295            this.replacement = replacement.toLowerCase(Locale.ENGLISH);
Note: See TracChangeset for help on using the changeset viewer.