source: josm/trunk/src/org/openstreetmap/josm/data/validation/routines/AbstractValidator.java@ 12478

Last change on this file since 12478 was 9921, checked in by simon04, 8 years ago

see #12570 - Group internet tags validator warnings

  • Property svn:eol-style set to native
File size: 1004 bytes
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.data.validation.routines;
3
4/**
5 * Abstract validator superclass to extend Apache Validator routines.
6 * @since 7489
7 */
8public abstract class AbstractValidator {
9
10 private String errorMessage;
11
12 /**
13 * Tests validity of a given value.
14 * @param value Value to test
15 * @return {@code true} if value is valid, {@code false} otherwise
16 */
17 public abstract boolean isValid(String value);
18
19 /**
20 * Returns the name of this validator
21 * @return the name of this validator
22 */
23 public abstract String getValidatorName();
24
25 /**
26 * Replies the error message.
27 * @return the errorMessage
28 */
29 public final String getErrorMessage() {
30 return errorMessage;
31 }
32
33 /**
34 * Sets the error message.
35 * @param errorMessage the errorMessage
36 */
37 protected final void setErrorMessage(String errorMessage) {
38 this.errorMessage = errorMessage;
39 }
40}
Note: See TracBrowser for help on using the repository browser.