Last change
on this file since 9855 was 9855, checked in by Don-vip, 8 years ago |
see #12557 : remove unused code
|
-
Property svn:eol-style
set to
native
|
File size:
856 bytes
|
Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.data.validation.routines;
|
---|
3 |
|
---|
4 | /**
|
---|
5 | * Abstract validator superclass to extend Apache Validator routines.
|
---|
6 | * @since 7489
|
---|
7 | */
|
---|
8 | public 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 | * Replies the error message.
|
---|
21 | * @return the errorMessage
|
---|
22 | */
|
---|
23 | public final String getErrorMessage() {
|
---|
24 | return errorMessage;
|
---|
25 | }
|
---|
26 |
|
---|
27 | /**
|
---|
28 | * Sets the error message.
|
---|
29 | * @param errorMessage the errorMessage
|
---|
30 | */
|
---|
31 | protected final void setErrorMessage(String errorMessage) {
|
---|
32 | this.errorMessage = errorMessage;
|
---|
33 | }
|
---|
34 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.