Class AbstractValidator
java.lang.Object
org.openstreetmap.josm.data.validation.routines.AbstractValidator
- Direct Known Subclasses:
DomainValidator,EmailValidator,InetAddressValidator,RegexValidator,UrlValidator
Abstract validator superclass to extend Apache Validator routines.
- Since:
- 7489
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal StringReplies the error message.abstract StringReturns the name of this validatorabstract booleanTests validity of a given value.protected final voidsetErrorMessage(String errorMessage) Sets the error message.
-
Field Details
-
errorMessage
-
-
Constructor Details
-
AbstractValidator
public AbstractValidator()
-
-
Method Details
-
isValid
Tests validity of a given value.- Parameters:
value- Value to test- Returns:
trueif value is valid,falseotherwise
-
getValidatorName
Returns the name of this validator- Returns:
- the name of this validator
-
getErrorMessage
Replies the error message.- Returns:
- the errorMessage
-
setErrorMessage
Sets the error message.- Parameters:
errorMessage- the errorMessage
-